更新panal更新后,JQuery无法工作。 [英] JQuery Can not work after update panal updateing.

查看:79
本文介绍了更新panal更新后,JQuery无法工作。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

首次使用jQuery和updatepanal在我的页面中正常工作但更新我的updatepanale它不起作用。使用postback triger以便工作,可以在updatepanal中使用jquery workig而不使用postback triger。

use jQuery and updatepanal in my page first time it properly working but update my updatepanale it not working. use postback triger so that working, it that possible jquery workig in updatepanal without postback triger.

推荐答案

如果你使用



if you used


document )。ready(功能(){
// .....
});
(document).ready(function (){ //..... });





然后它只调用一次它在updatepanel中没有工作

但是如果你想每次都重复使用js,那么请使用下面的代码。





Then it called only one time it's not worked in updatepanel
but if you want to re-use the js every time then use below code.

function pageLoad(sender, args) 
{
//put your code here....
}


<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <script src="jquery-2.1.3.min.js" type="text/javascript"></script>
    <script type="text/javascript">
        //JS working issue demo by click on link

        //Below code works every time

        function pageLoad(sender, args) {


这篇关于更新panal更新后,JQuery无法工作。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆