本文介绍了如何在使用“更新”面板时执行内容页面的JavaScript?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何在使用更新面板时执行内容页面JavaScript? 我对Update面板知之甚少!
How to execute JavaScript of Content page while using Update panel ? I know very little about Update panel!
推荐答案Hi Manzoor, Javascript文件将在 Hi Manzoor, Javascript files will be inside <head> .... </head>
使用这样的功能,以及PageLoad可以满足您的任何要求。 请参阅下面的示例代码。
use like this and the functionality insite the PageLoad can be anything as your require. See the sample code below.
<head runat="server"> <script type="text/javascript" language="javascript"> function pageLoad(sender, args) { alert("Please enter your specific codes below..."); } </script> </head>
将jQuery代码放在pageLoad中,而不是 Place the jQuery code inside pageLoad instead of
(document)。 ready(),内部pageLoad在每次回发,同步或异步后执行。 pageLoad是ASP.NET AJAX中用于此目的的保留函数名。 (document).ready(), inside pageLoad is executed after every postback, synchronous or asynchronous. pageLoad is a reserved function name in ASP.NET AJAX that is for this purpose.
更多推荐
如何在使用“更新”面板时执行内容页面的JavaScript?
发布评论