您的位置:首页 > 编程语言 > ASP

asp.net updatepanel 导致JS不能加载,而无法使用的解决方法

2018-10-12 14:07 991 查看


<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>

您可能感兴趣的文章:

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐