最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

jquery easyui如何實現(xiàn)格式化列

 更新時間:2017年07月30日 09:01:49   作者:huiy_小溪  
本篇文章主要介紹了jquery easyui如何實現(xiàn)格式化列 ,小編覺得挺不錯的,現(xiàn)在分享給大家,也給大家做個參考。一起跟隨小編過來看看吧

本文主要介紹了jquery easyui如何實現(xiàn)格式化列 ,正好最近需要用到,分享給大家,也給自己留個筆記

主框架頁面: 在主界面區(qū)會加載西區(qū)菜單點擊的URL內(nèi)容.

<!DOCTYPE html>
<html>
<head>
  <meta charset="UTF-8"/>
  <title>主界面</title>
  <div th:include="/public/util::public"/>
  <div th:include="/public/util::jquery-easyui"/>
  <script type="text/javascript" th:src="(${@configApp.getStaticWeb()})+'/cms/script/main/index.js'"></script>
  <script type="text/javascript" th:src="(${@configApp.getStaticWeb()})+'/cms/script/site/site-index.js'"></script>  
</head>
<body class="easyui-layout">
  <div data-options="region:'north',title:''" style="height:80px;" id="north"></div>
  <div data-options="region:'west',title:'系統(tǒng)功能區(qū)',split:true" style="width:200px;">
    <ul class="easyui-tree" id="menu"></ul>
  </div>
  <div data-options="region:'center',title:'主界面區(qū)'" style="padding:5px;" id="center"></div>
</body>
</html>

此時在主頁面已經(jīng)加載了easy-ui的腳本和CSS ,在各區(qū)頁面就不必加載了,即使加載了也會被去掉.

我一開始在datagrid頁面添加格式化函數(shù),但是沒有效果,始終報找不到formatIsvalid這個函數(shù).

<!DOCTYPE html>
<html>
<head>
  <meta charset="UTF-8"/>
  <title>站點列表頁面</title>
  <script type="text/javascript">
  function formatIsvalid(val,row){
    return val=='1'?'是':'否';
  }
  </script>
</head>
<body>
  <table id="site" title="站點列表" class="easyui-datagrid" th:url="@{/site/list}"
      toolbar="#siteToolbar" rownumbers="true" fitColumns="true" singleSelect="true">
    <thead>
      <tr>
        <th field="siteid" width="50">ID</th>
        <th field="sitename" width="50">名稱</th>
        <th field="siteurl" width="50">網(wǎng)址</th>
        <th field="isvalid" width="50" formatter="formatIsvalid">是否有效</th>
        <th field="isdelete" width="50">是否可以刪除</th>
        <th field="remark" width="50">備注</th>
        <th field="createtime" width="50">創(chuàng)建時間</th>
      </tr>
    </thead>
  </table>
  <div id="siteToolbar">
    <a href="#" rel="external nofollow" rel="external nofollow" rel="external nofollow" class="easyui-linkbutton" iconCls="icon-add" plain="true" onclick="newSite()">新增</a>
    <a href="#" rel="external nofollow" rel="external nofollow" rel="external nofollow" class="easyui-linkbutton" iconCls="icon-edit" plain="true" onclick="editSite()">編輯</a>
    <a href="#" rel="external nofollow" rel="external nofollow" rel="external nofollow" class="easyui-linkbutton" iconCls="icon-remove" plain="true" onclick="removeSite()">刪除</a>
  </div>
</body>
</html>

解決辦法:把這個格式化函數(shù)放到主頁面中就沒有問題了.

以上就是本文的全部內(nèi)容,希望對大家的學習有所幫助,也希望大家多多支持腳本之家。

相關(guān)文章

最新評論

乾安县| 万荣县| 白山市| 麻阳| 腾冲县| 乌审旗| 怀安县| 响水县| 化州市| 洪湖市| 宝山区| 班玛县| 扎囊县| 芦溪县| 西安市| 丹凤县| 吴旗县| 夏河县| 酉阳| 石楼县| 延吉市| 建平县| 长子县| 墨竹工卡县| 叶城县| 江达县| 英德市| 青州市| 长治县| 宜丰县| 三原县| 柳江县| 福建省| 双鸭山市| 蓬安县| 盐山县| 普格县| 元朗区| 和林格尔县| 隆尧县| 钟山县|