123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486 |
- <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
- <%
- String path = request.getContextPath();
- %>
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
- <title></title>
- <!--框架必需start-->
- <script type="text/javascript" src="<%=path%>/libs/js/jquery.js"></script>
- <script type="text/javascript" src="<%=path%>/libs/js/language/cn.js"></script>
- <script type="text/javascript" src="<%=path%>/libs/js/framework.js"></script>
- <link href="<%=path%>/libs/css/import_basic.css" rel="stylesheet" type="text/css"/>
- <link rel="stylesheet" type="text/css" id="skin" prePath="<%=path%>/"/>
- <link rel="stylesheet" type="text/css" id="customSkin"/>
- <!--框架必需end-->
- <!--父子表start-->
- <script type="text/javascript" src="<%=path%>/libs/js/table/detailTable.js"></script>
- <!--父子表end-->
- </head>
- <body>
- <div class="box1" panelWidth="800">
- <fieldset>
- <legend>1、基本使用</legend>
- <p>默认点击图标时,其他打开的自动关闭。</p>
- <table class="detailTable" useColor="false" useHover="false" useClick="false">
- <tr>
- <th width="30">操作</th><th width="100">姓名</th><th width="100">性别</th><th>备注</th>
- </tr>
- <tr>
- <td><span class="img_add2 hand" title="点击展开"></span></td><td>张小三</td><td>男</td><td>备注文字</td>
- </tr>
- <tr>
- <td></td>
- <td colspan="3">
- <table class="tableStyle">
- <tr>
- <th>日期</th><th>栏目1</th><th>栏目2</th><th>栏目3</th><th>栏目4</th>
- </tr>
- <tr>
- <td>2010-9-1</td><td>内容1</td><td>内容2</td><td>内容3</td><td>内容4</td>
- </tr>
- <tr>
- <td>2010-9-2</td><td>内容1</td><td>内容2</td><td>内容3</td><td>内容4</td>
- </tr>
- <tr>
- <td>2010-9-3</td><td>内容1</td><td>内容2</td><td>内容3</td><td>内容4</td>
- </tr>
- <tr>
- <td>2010-9-4</td><td>内容1</td><td>内容2</td><td>内容3</td><td>内容4</td>
- </tr>
- <tr>
- <td>2010-9-5</td><td>内容1</td><td>内容2</td><td>内容3</td><td>内容4</td>
- </tr>
- </table>
- </td>
- </tr>
-
- <tr>
- <td><span class="img_add2 hand" title="点击展开"></span></td><td>张小三</td><td>男</td><td>备注文字</td>
- </tr>
- <tr>
- <td></td>
- <td colspan="3">
- <table class="tableStyle">
- <tr>
- <th>日期</th><th>栏目1</th><th>栏目2</th><th>栏目3</th><th>栏目4</th>
- </tr>
- <tr>
- <td>2010-9-1</td><td>内容1</td><td>内容2</td><td>内容3</td><td>内容4</td>
- </tr>
- <tr>
- <td>2010-9-2</td><td>内容1</td><td>内容2</td><td>内容3</td><td>内容4</td>
- </tr>
- <tr>
- <td>2010-9-3</td><td>内容1</td><td>内容2</td><td>内容3</td><td>内容4</td>
- </tr>
- <tr>
- <td>2010-9-4</td><td>内容1</td><td>内容2</td><td>内容3</td><td>内容4</td>
- </tr>
- <tr>
- <td>2010-9-5</td><td>内容1</td><td>内容2</td><td>内容3</td><td>内容4</td>
- </tr>
- </table>
- </td>
- </tr>
-
- <tr>
- <td><span class="img_add2 hand" title="点击展开"></span></td><td>张小三</td><td>男</td><td>备注文字</td>
- </tr>
- <tr>
- <td></td>
- <td colspan="3">
- <table class="tableStyle">
- <tr>
- <th>日期</th><th>栏目1</th><th>栏目2</th><th>栏目3</th><th>栏目4</th>
- </tr>
- <tr>
- <td>2010-9-1</td><td>内容1</td><td>内容2</td><td>内容3</td><td>内容4</td>
- </tr>
- <tr>
- <td>2010-9-2</td><td>内容1</td><td>内容2</td><td>内容3</td><td>内容4</td>
- </tr>
- <tr>
- <td>2010-9-3</td><td>内容1</td><td>内容2</td><td>内容3</td><td>内容4</td>
- </tr>
- <tr>
- <td>2010-9-4</td><td>内容1</td><td>内容2</td><td>内容3</td><td>内容4</td>
- </tr>
- <tr>
- <td>2010-9-5</td><td>内容1</td><td>内容2</td><td>内容3</td><td>内容4</td>
- </tr>
- </table>
- </td>
- </tr>
-
- <tr>
- <td><span class="img_add2 hand" title="点击展开"></span></td><td>张小三</td><td>男</td><td>备注文字</td>
- </tr>
- <tr>
- <td></td>
- <td colspan="3">
- <table class="tableStyle">
- <tr>
- <th>日期</th><th>栏目1</th><th>栏目2</th><th>栏目3</th><th>栏目4</th>
- </tr>
- <tr>
- <td>2010-9-1</td><td>内容1</td><td>内容2</td><td>内容3</td><td>内容4</td>
- </tr>
- <tr>
- <td>2010-9-2</td><td>内容1</td><td>内容2</td><td>内容3</td><td>内容4</td>
- </tr>
- <tr>
- <td>2010-9-3</td><td>内容1</td><td>内容2</td><td>内容3</td><td>内容4</td>
- </tr>
- <tr>
- <td>2010-9-4</td><td>内容1</td><td>内容2</td><td>内容3</td><td>内容4</td>
- </tr>
- <tr>
- <td>2010-9-5</td><td>内容1</td><td>内容2</td><td>内容3</td><td>内容4</td>
- </tr>
- </table>
- </td>
- </tr>
- </table>
- </fieldset>
- <div class="height_15"></div>
-
-
- <fieldset>
- <legend>2、另一种展开方式</legend>
- <p>点击图标时,其他打开的不关闭。</p>
- <table class="detailTable" useColor="false" useHover="false" useClick="false" ohterClose="false">
- <tr>
- <th width="30">操作</th><th width="100">姓名</th><th width="100">性别</th><th>备注</th>
- </tr>
- <tr>
- <td><span class="img_add2 hand" title="点击展开"></span></td><td>张小三</td><td>男</td><td>备注文字</td>
- </tr>
- <tr>
- <td></td>
- <td colspan="3">
- <table class="tableStyle">
- <tr>
- <th>日期</th><th>栏目1</th><th>栏目2</th><th>栏目3</th><th>栏目4</th>
- </tr>
- <tr>
- <td>2010-9-1</td><td>内容1</td><td>内容2</td><td>内容3</td><td>内容4</td>
- </tr>
- <tr>
- <td>2010-9-2</td><td>内容1</td><td>内容2</td><td>内容3</td><td>内容4</td>
- </tr>
- <tr>
- <td>2010-9-3</td><td>内容1</td><td>内容2</td><td>内容3</td><td>内容4</td>
- </tr>
- <tr>
- <td>2010-9-4</td><td>内容1</td><td>内容2</td><td>内容3</td><td>内容4</td>
- </tr>
- <tr>
- <td>2010-9-5</td><td>内容1</td><td>内容2</td><td>内容3</td><td>内容4</td>
- </tr>
- </table>
- </td>
- </tr>
-
- <tr>
- <td><span class="img_add2 hand" title="点击展开"></span></td><td>张小三</td><td>男</td><td>备注文字</td>
- </tr>
- <tr>
- <td></td>
- <td colspan="3">
- <table class="tableStyle">
- <tr>
- <th>日期</th><th>栏目1</th><th>栏目2</th><th>栏目3</th><th>栏目4</th>
- </tr>
- <tr>
- <td>2010-9-1</td><td>内容1</td><td>内容2</td><td>内容3</td><td>内容4</td>
- </tr>
- <tr>
- <td>2010-9-2</td><td>内容1</td><td>内容2</td><td>内容3</td><td>内容4</td>
- </tr>
- <tr>
- <td>2010-9-3</td><td>内容1</td><td>内容2</td><td>内容3</td><td>内容4</td>
- </tr>
- <tr>
- <td>2010-9-4</td><td>内容1</td><td>内容2</td><td>内容3</td><td>内容4</td>
- </tr>
- <tr>
- <td>2010-9-5</td><td>内容1</td><td>内容2</td><td>内容3</td><td>内容4</td>
- </tr>
- </table>
- </td>
- </tr>
-
- <tr>
- <td><span class="img_add2 hand" title="点击展开"></span></td><td>张小三</td><td>男</td><td>备注文字</td>
- </tr>
- <tr>
- <td></td>
- <td colspan="3">
- <table class="tableStyle">
- <tr>
- <th>日期</th><th>栏目1</th><th>栏目2</th><th>栏目3</th><th>栏目4</th>
- </tr>
- <tr>
- <td>2010-9-1</td><td>内容1</td><td>内容2</td><td>内容3</td><td>内容4</td>
- </tr>
- <tr>
- <td>2010-9-2</td><td>内容1</td><td>内容2</td><td>内容3</td><td>内容4</td>
- </tr>
- <tr>
- <td>2010-9-3</td><td>内容1</td><td>内容2</td><td>内容3</td><td>内容4</td>
- </tr>
- <tr>
- <td>2010-9-4</td><td>内容1</td><td>内容2</td><td>内容3</td><td>内容4</td>
- </tr>
- <tr>
- <td>2010-9-5</td><td>内容1</td><td>内容2</td><td>内容3</td><td>内容4</td>
- </tr>
- </table>
- </td>
- </tr>
-
- <tr>
- <td><span class="img_add2 hand" title="点击展开"></span></td><td>张小三</td><td>男</td><td>备注文字</td>
- </tr>
- <tr>
- <td></td>
- <td colspan="3">
- <table class="tableStyle">
- <tr>
- <th>日期</th><th>栏目1</th><th>栏目2</th><th>栏目3</th><th>栏目4</th>
- </tr>
- <tr>
- <td>2010-9-1</td><td>内容1</td><td>内容2</td><td>内容3</td><td>内容4</td>
- </tr>
- <tr>
- <td>2010-9-2</td><td>内容1</td><td>内容2</td><td>内容3</td><td>内容4</td>
- </tr>
- <tr>
- <td>2010-9-3</td><td>内容1</td><td>内容2</td><td>内容3</td><td>内容4</td>
- </tr>
- <tr>
- <td>2010-9-4</td><td>内容1</td><td>内容2</td><td>内容3</td><td>内容4</td>
- </tr>
- <tr>
- <td>2010-9-5</td><td>内容1</td><td>内容2</td><td>内容3</td><td>内容4</td>
- </tr>
- </table>
- </td>
- </tr>
- </table>
- </fieldset>
- <div class="height_15"></div>
-
-
- <fieldset>
- <legend>3、点击整行触发</legend>
- <table class="detailTable" useColor="false" useHover="false" useClick="false" trClick="true">
- <tr>
- <th width="30">操作</th><th width="100">姓名</th><th width="100">性别</th><th>备注</th>
- </tr>
- <tr>
- <td><span class="img_add2 hand" title="点击展开"></span></td><td>张小三</td><td>男</td><td>备注文字</td>
- </tr>
- <tr>
- <td></td>
- <td colspan="3">
- <table class="tableStyle">
- <tr>
- <th>日期</th><th>栏目1</th><th>栏目2</th><th>栏目3</th><th>栏目4</th>
- </tr>
- <tr>
- <td>2010-9-1</td><td>内容1</td><td>内容2</td><td>内容3</td><td>内容4</td>
- </tr>
- <tr>
- <td>2010-9-2</td><td>内容1</td><td>内容2</td><td>内容3</td><td>内容4</td>
- </tr>
- <tr>
- <td>2010-9-3</td><td>内容1</td><td>内容2</td><td>内容3</td><td>内容4</td>
- </tr>
- <tr>
- <td>2010-9-4</td><td>内容1</td><td>内容2</td><td>内容3</td><td>内容4</td>
- </tr>
- <tr>
- <td>2010-9-5</td><td>内容1</td><td>内容2</td><td>内容3</td><td>内容4</td>
- </tr>
- </table>
- </td>
- </tr>
-
- <tr>
- <td><span class="img_add2 hand" title="点击展开"></span></td><td>张小三</td><td>男</td><td>备注文字</td>
- </tr>
- <tr>
- <td></td>
- <td colspan="3">
- <table class="tableStyle">
- <tr>
- <th>日期</th><th>栏目1</th><th>栏目2</th><th>栏目3</th><th>栏目4</th>
- </tr>
- <tr>
- <td>2010-9-1</td><td>内容1</td><td>内容2</td><td>内容3</td><td>内容4</td>
- </tr>
- <tr>
- <td>2010-9-2</td><td>内容1</td><td>内容2</td><td>内容3</td><td>内容4</td>
- </tr>
- <tr>
- <td>2010-9-3</td><td>内容1</td><td>内容2</td><td>内容3</td><td>内容4</td>
- </tr>
- <tr>
- <td>2010-9-4</td><td>内容1</td><td>内容2</td><td>内容3</td><td>内容4</td>
- </tr>
- <tr>
- <td>2010-9-5</td><td>内容1</td><td>内容2</td><td>内容3</td><td>内容4</td>
- </tr>
- </table>
- </td>
- </tr>
- </table>
- </fieldset>
- <div class="height_15"></div>
-
-
- <fieldset>
- <legend>4、ajax加载子表</legend>
- <table class="detailTable" useColor="false" useHover="false" useClick="false" ohterClose="false" ajaxMode="true">
- <tr>
- <th width="30">操作</th><th width="100">姓名</th><th width="100">性别</th><th>备注</th>
- </tr>
- <tr>
- <td><span class="img_add2 hand" title="点击展开" url="<%=path%>/sample/table/data/table1.html"></span></td><td>张小三</td><td>男</td><td>备注文字</td>
- </tr>
- <tr>
- <td></td>
- <td colspan="3">
- <table class="tableStyle"></table>
- </td>
- </tr>
-
- <tr>
- <td><span class="img_add2 hand" title="点击展开" url="<%=path%>/sample/table/data/table2.html"></span></td><td>张小三</td><td>男</td><td>备注文字</td>
- </tr>
- <tr>
- <td></td>
- <td colspan="3">
- <table class="tableStyle"></table>
- </td>
- </tr>
-
- <tr>
- <td><span class="img_add2 hand" title="点击展开" url="<%=path%>/sample/table/data/table1.html"></span></td><td>张小三</td><td>男</td><td>备注文字</td>
- </tr>
- <tr>
- <td></td>
- <td colspan="3">
- <table class="tableStyle"></table>
- </td>
- </tr>
-
- <tr>
- <td><span class="img_add2 hand" title="点击展开" url="<%=path%>/sample/table/data/table2.html"></span></td><td>张小三</td><td>男</td><td>备注文字</td>
- </tr>
- <tr>
- <td></td>
- <td colspan="3">
- <table class="tableStyle"></table>
- </td>
- </tr>
- </table>
- </fieldset>
- <div class="height_15"></div>
-
- <fieldset>
- <legend>5、点击表格行ajax加载</legend>
- <div class="red">此示例由后台支持</div>
- <table class="detailTable" useColor="false" useHover="false" useClick="false" ajaxMode="true" trClick="true">
- <tr>
- <th width="30">操作</th><th width="100">姓名</th><th width="100">性别</th><th>备注</th>
- </tr>
- <tr>
- <td><span class="img_add2 hand" title="点击展开" url="<%=path%>/getDetailTable.action?id=1"></span></td><td>张小三</td><td>男</td><td>备注文字</td>
- </tr>
- <tr>
- <td></td>
- <td colspan="3">
- <table class="tableStyle"></table>
- </td>
- </tr>
-
- <tr>
- <td><span class="img_add2 hand" title="点击展开" url="<%=path%>/getDetailTable.action?id=2"></span></td><td>欧阳小三</td><td>女</td><td>备注文字</td>
- </tr>
- <tr>
- <td></td>
- <td colspan="3">
- <table class="tableStyle"></table>
- </td>
- </tr>
-
- <tr>
- <td><span class="img_add2 hand" title="点击展开" url="<%=path%>/getDetailTable.action?id=3"></span></td><td>诸葛小三</td><td>男</td><td>备注文字</td>
- </tr>
- <tr>
- <td></td>
- <td colspan="3">
- <table class="tableStyle"></table>
- </td>
- </tr>
-
- <tr>
- <td><span class="img_add2 hand" title="点击展开" url="<%=path%>/getDetailTable.action?id=4"></span></td><td>上官小三</td><td>女</td><td>备注文字</td>
- </tr>
- <tr>
- <td></td>
- <td colspan="3">
- <table class="tableStyle"></table>
- </td>
- </tr>
- </table>
- </fieldset>
- <div class="height_15"></div>
-
- <fieldset>
- <legend>6、动态创建</legend>
- <input type="button" value="点击创建" id="testBtn" onclick="createDetailTable()"/>
-
- </fieldset>
- <div class="height_15"></div>
-
- </div>
-
- <script>
- function createDetailTable(){
- var $tableObj=$('<table class="detailTable" useColor="false" useHover="false" useClick="false" ajaxMode="true" trClick="true">'+
- '<tr>'+
- '<th width="30">操作</th><th width="100">姓名</th><th width="100">性别</th><th>备注</th>'+
- '</tr> '+
- '<tr>'+
- '<td><span class="img_add2 hand" title="点击展开" url="<%=path%>/sample/table/data/table1.html"></span></td><td>张小三</td><td>男</td><td>备注文字</td>'+
- '</tr>'+
- '<tr>'+
- '<td></td>'+
- '<td colspan="3">'+
- '<table class="tableStyle"></table>'+
- '</td>'+
- '</tr>'+
- '<tr>'+
- '<td><span class="img_add2 hand" title="点击展开" url="<%=path%>/sample/table/data/table2.html"></span></td><td>张小三</td><td>男</td><td>备注文字</td>'+
- '</tr>'+
- '<tr>'+
- '<td></td>'+
- '<td colspan="3">'+
- '<table class="tableStyle"></table>'+
- '</td>'+
- '</tr>'+
- '</table>');
- $tableObj.render();
- $("#testBtn").after($tableObj);
- }
- </script>
- </body>
- </html>
|