ASP.NET 后台如何执行JS
<script>function turnoff(obj){document.getElementById(obj).style.display="none";}</script>if(Sta=="1"){//执行turnoff('DIV2');}else{//执行turnoff('DIV1');} if (Sta == "1") { ClientScript.RegisterStartupScript(this.GetType(), "test", "turnoff('DIV2');", false); } else { ClientScript.RegisterStartupScript(this.GetType(), "test", "turnoff('DIV1');", false); }
[解决办法]