国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 編程 > JavaScript > 正文

JQEasy-ui在IE9以下版本中二次加載的問題分析及處理方法

2019-11-20 14:25:21
字體:
來源:轉載
供稿:網友

網上答案說是因為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>

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 甘德县| 新宾| 辽宁省| 堆龙德庆县| 汉源县| 新沂市| 焦作市| 双流县| 丰原市| 青州市| 潼南县| 澎湖县| 靖西县| 武冈市| 河池市| 红安县| 锡林浩特市| 舞钢市| 绥中县| 襄樊市| 延庆县| 唐河县| 温宿县| 闸北区| 印江| 泽库县| 信丰县| 兰溪市| 永顺县| 青冈县| 太仓市| 阿巴嘎旗| 汪清县| 车致| 尼勒克县| 固原市| 巴林左旗| 那坡县| 自治县| 阜平县| 北宁市|