asp.net 后台怎么调用页面里的javascript?
asp.net 后台怎么调用页面里的javascript?
如:
<script langeuage=javascript>
function go()
{
alert( "弹出提示! ");
}
</script>
有一个按钮,他的click事件里怎么调用go()?( 后台调用 )
------解决方案--------------------page.ClientScript.RegisterClientScriptBlock( this, "message " , " <script language= 'javascript ' defer> go(); </script> " );
------解决方案--------------------btn.Attributes.Add( "Onclick ", "go(); ")
------解决方案--------------------在那个事件里:
ClientScript.RegisterClientScriptBlock( this.GetType() , "message " , " <script language= 'javascript ' defer> go(); </script> " );
------解决方案--------------------ClientScriptManager.RegisterClientScriptBlock(this.GetType(), "key ", "jscode ")
------解决方案--------------------private void Button1_Click(object sender, System.EventArgs e)
{
btn.Attributes.Add( "Onclick ", "go(); ")
}
------解决方案-------------------- <INPUT class= "button " id= "btnView " style= "Z-INDEX: 101; LEFT: 216px; WIDTH: 64px; POSITION: absolute; TOP: 240px; HEIGHT: 24px " type= "button " value= "显示 " onclick= "go(); ">
------解决方案--------------------sbqcel(空空儿) (
赞成!
------解决方案--------------------管理——填空——给分——一切都结束了!
------解决方案--------------------this.btn.Attributes.Add( "onclick ", "go(); ");
------解决方案--------------------http://www.cshap.com.cn