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

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

 更新時間:2014年06月23日 10:59:05   投稿:hebedich  
之前項目中才用了Easy-ui,但是在同時使用tree和grid的效果時,因為頁面有倆個URL,分別為Ajax樹去后臺取數(shù)據(jù)和Grid取數(shù)據(jù),在IE9以上以及其他瀏覽器里都沒有問題,在Ie低版本時會出現(xiàn)先加載表格,然后一閃而過加載樹渲染頁面,造成頁面只有tree數(shù)據(jù)而沒有表格grid數(shù)據(jù)。

網(wǎng)上答案說是因為Easy-ui在低版本時應將class樣式刪去,而在javascript里寫url,因為class里有url的話javascript里也存在url,就會使頁面刷新倆次,但是測試后沒有解決我的問題,后來通過反復測試終于找到問題,

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

因為在頁面寫了style,將style里的樣式刪去就可以解決問題了,現(xiàn)附上完整的ajax動態(tài)樹和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: {//要傳入的參數(shù)
     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>

相關文章

  • jQuery.each()用法分享

    jQuery.each()用法分享

    昨天寫了個小插件,用到這個方法,不太明白$.each()這個方法,今天查了下手冊,學習一下
    2012-07-07
  • jQuery實現(xiàn)上下滾動公告欄詳細代碼

    jQuery實現(xiàn)上下滾動公告欄詳細代碼

    之前做項目的時候,一直都想著做一個上下滾動的公告欄,作為展示網(wǎng)站的最新公告信息,給用戶帶來極好的用戶體驗,下面小編通過實例代碼給大家分享基于jQuery實現(xiàn)上下滾動公告欄,感興趣的朋友一起看看吧
    2018-11-11
  • JQuery擴展插件Validate 5添加自定義驗證方法

    JQuery擴展插件Validate 5添加自定義驗證方法

    從前面的示例中不難看出validate中自帶的驗證方法足以滿足一般的要求,對于特別的要求可以使用addMethod(name,method,message)添加自定義的驗證規(guī)則,下面的示例中添加了一個用于正則表達式驗證的擴展驗證的方法
    2011-09-09
  • jquery更換文章內(nèi)容與改變字體大小代碼

    jquery更換文章內(nèi)容與改變字體大小代碼

    更換文章內(nèi)容與改變字體大小的方法有很多,在本文為大家介紹下使用jquery是如何實現(xiàn)的,感興趣的朋友可不要錯過了
    2013-09-09
  • jquery js 獲取時間差、時間格式具體代碼

    jquery js 獲取時間差、時間格式具體代碼

    獲取獲得時間差、時間格式的方法有很多,下面為大家介紹下使用jquery及js實現(xiàn)的功能代碼
    2013-06-06
  • jquery實現(xiàn)手機號碼選號的方法

    jquery實現(xiàn)手機號碼選號的方法

    這篇文章主要介紹了jquery實現(xiàn)手機號碼選號的方法,涉及jquery針對手機號碼的分析與篩選技巧,具有一定參考借鑒價值,需要的朋友可以參考下
    2015-07-07
  • ajax無刷新動態(tài)調(diào)用股票信息(改良版)

    ajax無刷新動態(tài)調(diào)用股票信息(改良版)

    今日閑來無事,把上次寫的代碼稍微改了改。增加了動態(tài)追加和刪除股票信息的功能(代碼基于jquery運行:http://jquery.com/) 。由于對Ajax技術(shù)的認識還只是在初級階段,總覺得這么些有點別扭,希望大蝦能夠指點一二。
    2008-11-11
  • 基于jquery的動畫效果代碼

    基于jquery的動畫效果代碼

    基于jquery的動畫效果代碼,挺有意思的,需要的朋友可以參考下
    2012-07-07
  • Jquery數(shù)字上下滾動動態(tài)切換插件

    Jquery數(shù)字上下滾動動態(tài)切換插件

    有時我們需要動態(tài)的展示訪問次數(shù)、下載次數(shù)等效果,我們可以借助jQuery結(jié)合后臺php實現(xiàn)一個滾動的數(shù)字展示效果。
    2015-08-08
  • js獲取通過ajax返回的map型的JSONArray的方法

    js獲取通過ajax返回的map型的JSONArray的方法

    下面是js獲取通過ajax返回的map型的JSONArray的詳細代碼,需要的朋友可以參考下
    2014-01-01

最新評論