当前位置: 首页 > 编程笔记 >

JQEasy-ui在IE9以下版本中二次加载的问题分析及处理方法

柴昆杰
2023-03-14
本文向大家介绍JQEasy-ui在IE9以下版本中二次加载的问题分析及处理方法,包括了JQEasy-ui在IE9以下版本中二次加载的问题分析及处理方法的使用技巧和注意事项,需要的朋友参考一下

网上答案说是因为Easy-ui在低版本时应将class样式删去,而在javascript里写url,因为class里有url的话javascript里也存在url,就会使页面刷新俩次,但是测试后没有解决我的问题,后来通过反复测试终于找到问题,

<ul id="eva" style=" font-size:25px; ">
</ul>

因为在页面写了style,将style里的样式删去就可以解决问题了,现附上完整的ajax动态树和Grid表格代码。

<html>
<head>
 <title>Tree</title>
 <link href="../../Content/JQEasyUI/themes/default/easyui.css" rel="stylesheet" type="text/css" />
 <link href="../../Content/JQEasyUI/themes/icon.css" rel="stylesheet" />
 <script src="../../Scripts/jquery-1.4.4.min.js" type="text/javascript"></script>
 <script src="../../Scripts/jquery.unobtrusive-ajax.js" type="text/javascript"></script>
 <script src="../../Scripts/jquery.easyui.min.js" type="text/javascript"></script>
 <script src="../../Scripts/easyui-lang-zh_CN.js" type="text/javascript"></script>
 <script type="text/javascript">
  var NodeText;
  var time;
  var treeeva;
  $(function () {
   initTable();
   $("#SelectForm").css("display", "none");
   bindSearcheClick();
    $('#eva').tree({
     url: '/OEE/GetTree',
     method: 'get',
     animate: true,
     checkbox: true
    });
  });
  //初始化表格
  function initTable() {

   $('#tt').datagrid({
    url: '/OEE/Details',
    title: 'OEE',
    width: 700,
    height: 360,
    fitColumns: true,
    idField: 'Fid',
    loadMsg: '正在加载设备的信息...',
    pagination: true,
    singleSelect: false,
    pageSize: 10,
    pageNumber: 1,
    pageList: [10, 20, 30],
    queryParams: {//要传入的参数
     NodeResult: NodeText,
     SelectTime: $('#SelectTime').datebox('getValue')
    },
    columns: [[//{EID, ETypeName, ThenTypeInfoTID, EtypeNum}
      {field: 'Num', title: '设备编号', width: 80, align: "center" },
      { field: 'Name', title: '设备名称', width: 80, align: "center" },
      { field: 'EarlyTimeOEE', title: '早班OEE', width: 80, align: "center" },
      { field: 'MiddleTimeOEE', title: '午班OEE', width: 80, align: "center" },
      { field: 'LaterTimeOEE', title: '晚班OEE', width: 80, align: "center" },
       {
        field: 'DelFlag', title: '操作', width: 80, align: 'center',
        formatter: function (value, row, index) {
         var str = "<a Fid='" + row.Fid + "' class='SelectInfo' href='javascript:void(0)'>明细</a>  ";
         return str;
        }
       }
    ]],
    onHeaderContextMenu: function (e, field) {

    },
    onLoadSuccess: function (data) {
     $(".SelectInfo").unbind("click");
     $(".SelectInfo").bind("click", function () {

      doSelect($(this).attr("Fid"), time);
      return false;
     });
    }
   });
  }
  function doSelect(Fid, Time) {
   var reg = new RegExp("-", "g");
   var strobj = Fid.toString();
   var newstr = strobj.replace(reg, "$");
   $('#SelectFrame').attr('src', '/OEE/GetSelectInfo/' + Fid + '/' + Time);
   $('#SelectForm').css('display', 'block');
   $('#SelectForm').dialog({
    width: 470,
    height: 470,
    modal: true,
    title: "显示明细信息",
    collapsible: true,
    minimizable: true,
    maximizable: true,
    resizable: true,
    buttons: [{
     id: 'btnSelect',
     text: '确定',
     iconCls: 'icon-add',
     handler: function () {
      $("#SelectForm").dialog("close");
     }
    }]
   });
  }

  //绑定搜索查询的 点击事件
  function bindSearcheClick() {
   //linkButtonSearch
   $("#linkButtonSearch").click(function () {
    var nodes = $('#eva').tree('getChecked');
    var s = '';
    for (var i = 0; i < nodes.length; i++) {
     if (s != '') s += ',';
     s += nodes[i].id;
    }
    NodeText = s;
    time = $('#SelectTime').datebox('getValue');

    initTable();
   });
  }
 </script>
</head>
<body>

 <div style="width: 1000px">
  <div style="width: 200px; float: left">
   <div style="margin: 23px 0;">
   </div>
   <div class="easyui-panel" style="padding: 5px; border-radius: 5px;">
    <ul id="eva" >
    </ul>
   </div>
  </div>
  <div id="Right">
   <div id="query">
    查询时间:<input class="easyui-datebox" name="SelectTime" id="SelectTime" />
    <a id="linkButtonSearch" href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-search'">
     查询</a>
   </div>
   <table id="tt" style="width: 700px;" title="标题" iconcls="icon-edit">
   </table>
   <div id="SelectForm">
    <iframe id="SelectFrame" src="javascript:void(0)" frameborder="0" width="100%" height="100%">
    </iframe>
   </div>
  </div>
 </div>
</body>
</html>
 类似资料:
  • 本文向大家介绍php文件下载处理方法分析,包括了php文件下载处理方法分析的使用技巧和注意事项,需要的朋友参考一下 本文实例讲述了php文件下载的处理方法。分享给大家供大家参考。具体分析如下: php能够处理多种条件的文件下载,先来看下面示例: 分析上述代码: 第一行代码是强制下载; 第二行代码是给下载的内容指定一个名字; 第三行代码是把下载的内容读进文件中。   一直以为要在一个页面中同时下载多

  • 本文档介绍 DM 中可能存在的、常见的性能问题及其处理方法。 在诊断与处理性能问题时,请确保已经正确配置并安装 DM 的监控组件,并能在 Grafana 监控面板查看 DM 的监控指标。 在诊断性能问题时,请先确保对应组件正在正常运行,否则可能出现监控指标异常的情况,对性能问题的诊断造成干扰。 在诊断问题前,也可以先了解 DM 的性能测试报告。 当数据迁移过程存在较大延迟时,若需快速定位瓶颈是在

  • 本文向大家介绍jQuery插件版本冲突的处理方法分析,包括了jQuery插件版本冲突的处理方法分析的使用技巧和注意事项,需要的朋友参考一下 本文实例分析了jQuery插件版本冲突的处理方法。分享给大家供大家参考,具体如下: jQuery 的某个插件 当有多个版本同时可能会有冲突,导致代码错误 参考typeahead的处理方法,可以在插件中增加noconflict 方法来解决这个问题(在进入版本的时

  • 本文向大家介绍C#反色处理及其效率问题分析,包括了C#反色处理及其效率问题分析的使用技巧和注意事项,需要的朋友参考一下 本文实例分析了C#反色处理及其效率问题。分享给大家供大家参考。具体分析如下: 网上很多这方面的资料,常看到的版本如下面: 上述代码执行没有问题,但效率存在很大一个问题,执行起来很慢,测试了一下1920 x 1080分辨率,执行时间8秒左右;2560 x 1920分辨率,执行时间达

  • 嗨,我是一个网络开发新手。我正在努力开发一个社交网站。在数据库设计级别,我觉得我有一些问题。我的问题来了。 null null

  • 我试图让处理显示包含我的关键字的最新推文。我卡住了。我不确定如何检查它是否在更新。我知道它可以拉出最近的推特,但到目前为止,我唯一可以查看最新推特的方法是重新启动我的程序。抱歉太乱了。