且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何从asp.net中的代码隐藏调用javascript

更新时间:2023-02-11 22:29:47

使用Page.ClientScript.RegisterStartupScript.
Page.ClientScript.RegisterStartupScript(this.GetType(), "MyScript",
   "javascript:TestJavascriptFunction();", true);


哎呀,
从后面的代码中调用JScript [在后面调用JScript代码 [ ^ ]
Hi anoop,
Calling JScript from code behind[^]
Calling JScript Code Behind[^]


简单的google搜索将回答此问题.试试这个:

使用&调用RegisterStartUpScript,RegisterClientScript和客户端脚本 [ ^ ]

希望对您有所帮助:)
Simple google search will answer this question. Try this:

Use & Call RegisterStartUpScript, RegisterClientScript and Client-Side Script[^]

hope it helps :)