开发者

calling javascript from server side

How开发者_高级运维 to call javascript function from server side


You can simply do a Response.Write("<script language='javascript'>nameOfJavascriptFunction();</script>"), or use ClientScriptManager.RegisterClientScriptBlock with a similar script.

The effect is that you are outputting a script tag calling your function - the call is still done on the client side.


How about having the client side polling the server for actions instead? Do a call to the server side to check for a certain state, and if that state is fulfilled call the function? Should be easily achieved.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜