欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

asp.net updatepanel 導致JS不能加載,而無法使用的解決方法

 更新時間:2013年08月12日 11:21:07   作者:  
asp.net updatepanel 局部刷新,導致JS不能加載,而無法使用,而且 updatepanel會刷兩次,郁悶的,解決方法如下

復制代碼 代碼如下:

<script type="text/javascript" language="javascript">
    var prm = Sys.WebForms.PageRequestManager.getInstance();
    prm.add_endRequest(function () {
        // re-bind your jquery events here 
        $(document).ready(function () {

            //begin
            var span = $("input[id*='txtSpan']");
            span.focusout(function () {
                var greaterthenzero = (span.val() == 0);
                if (span.val() == 0) {
                    $("#spRule").show();
                    $("input[id*='btnSave']").attr("disabled","disabled");
                }
                else {
                    $("#spRule").hide();
                    $("input[id*='btnSave']").removeAttr("disabled");
                }
            });
            //end

        });
    }
 );
</script>

相關文章

最新評論