zoukankan      html  css  js  c++  java
  • 控件禁用

    <!--用于判断页面传值控制界面是否只读-->
    <script>
    function checkType() {
    var aQuery = window.location.href.split("?"); //取得Get参数 var aGET = new Array(); if (aQuery.length > 1) {
    var aBuf = aQuery[1].split("&"); for (var i = 0, iLoop = aBuf.length; i < iLoop; i++) {
    var aTmp = aBuf[i].split("="); //分离key与Value aGET[aTmp[0]] = aTmp[1];
    }
    } return aGET;
    } //窗体禁用 function readDisableControls() {
    $(document).contents().find(".easyui-textbox").each(function () {
    jQuery("#" + this.id).textbox("disable", true);
    }); $(document).contents().find(".easyui-databox").each(function () {
    jQuery("#" + this.id).databox("disable", true);
    }); $(document).contents().find(".easyui-datetimebox").each(function () {
    jQuery("#" + this.id).datetimebox("disable", true);
    }); $(document).contents().find(".easyui-combobox").each(function () {
    jQuery("#" + this.id).combobox("readonly", true); }); $(document).contents().find(".easyui-combo").each(function () {
    jQuery("#" + this.id).combo("readonly", true);
    }); $(document).contents().find(".easyui-filebox").each(function () {
    jQuery("#" + this.id).filebox("disable", true);
    }); $(document).contents().find(".easyui-linkbutton").each(function () {
    jQuery("#" + this.id).linkbutton("disable", true);
    }); $(document).contents().find(".easyui-datagrid").each(function () {
    jQuery("#" + this.id).datagrid("disable", true);
    }); $(document).contents().find("a").each(function () {
    jQuery("#" + this.id).attr("href", "javascript:void(0)"); }); $(document).contents().find("checkbox").each(function () {
    jQuery("#" + this.id).attr("readonly",true);
    });
    }
    </script>

    if (checkType()["t"] == "read") {
    readDisableControls();
    }

  • 相关阅读:
    解决This application failed to start because it could not find or load the Qt platform plugin "windows
    计算几何-凸包-toleft test
    Bit Operation妙解算法题
    带线表格据gt生成无线表格
    caffe的python接口提取resnet101某层特征
    camelot工具进行pdf表格解析重建
    python批量爬取文档
    IP被封检测地址
    驱动人生后门清除方案
    应用安全
  • 原文地址:https://www.cnblogs.com/zhang-wenbin/p/5809799.html
Copyright © 2011-2022 走看看