javascript中设置Visible属性可行吗?
<div id="show" runat="server">功能测试</div><script type="text/javascript">window.onload = initAll;
function initAll() {
document.getElementById("<%=btn1.ClientID%>").onclick = initRedirect;
function initRedirect() {
if (confirm("Are you sure you want to do that?")) {
alert("You said yes");
document.getElementById("<%=show.ClientID%>").Visible = false;
}
else {
alert("You said no");
}
}
}</script>
对话框Are you sure you want to do that?弹出后,我点了确定,但是document.getElementById("<%=show.ClientID%>").Visible = false;不生效,为什么呢?谢谢。
是否应该通过方法设置 有日志吗,添加常规日志分析
页:
[1]