Toggle main menu visibility
新聞
下載
教材
影音
討論
其他選單
好站連結
行事曆
電子相簿
常見問題
萬用表單
即時留言簿
友站消息
社大學員
:::
登入
登入
帳號
密碼
登入
重整畫面
:::
所有書籍
「[991]PHP網站開發 進階應用技巧2」目錄
MarkDown
4. 表格內容排序
1. 網頁多媒體
2. Superfish下拉選單
2-1 index.php(遞迴範例)
3. 連動選單
3-1 menu1.php
3-2 menu2.php
3-3 menu1.php(索引與值都相同的精簡寫法)
3-4 demo/index.php
4. 表格內容排序
4-1 index.php
5. 拉動表格進行排序
5-1 index.php
5-2 checkbox.html
6. 即時聊天系統
6-1 index.php
7. PHP檔案操作(上)
7-1 index.php
7-2 iconize_l.css
8. PHP檔案操作(下)
8-1 index.php
8-2 index.php 中文目錄修正
9. 相片EXIF資訊及上傳
9-1 index.php
10. 目錄管理及相片特效
10-1 index.php
10-2 exif.php
11. 多媒體RSS
11-1 index.php
11-2 mrss.php
12. 樹狀目錄+HTML5
12-1 index.php
12-2 dtree.js
13. DHX入門(上)
13-1 index.php
13-2 index2.php
13-3 index3.php
13-4 index4.php
14. DHX編輯器及選單
14-1 index.php
14-2 input.php
14-3 setup.php
14-4 list.php
14-5 view.php
14-6 menu.xml
15. 點擊編輯
15-1 index.php
15-2 save.php
16. curl網頁採集
16-1 index.php
16-2 test1.php
17. 讀取RSS
17-1 index.php
18. 無刷新登入
18-1 index.php
18-2 login.php
18-3 index.php(AJAX版)
18-4 login.php(AJAX版)
5. 拉動表格進行排序
\[991\]PHP網站開發 進階應用技巧2 ====================== <?php $root\_pass="12345"; //資料庫root密碼 $db\_name="test"; //資料庫名稱 /\* 連資料庫檢查 \*/ $link=mysql\_connect("localhost","root",$root\_pass); //資料庫連線 mysql\_select\_db("test"); mysql\_query("SET NAMES 'utf8'"); //設定語系 error\_reporting(0);
$sql="select \* from course"; $result=mysql\_query($sql); while(list($c0,$c1,$c2,$c3,$c4,$c5,$c6)=mysql\_fetch\_row($result)){ $tbody.="<tr><td>$c0</td><td>$c1</td><td>$c2</td><td>$c3</td><td>$c4</td><td>$c5</td><td>$c6</td></tr>"; }
?> <html> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <title></title> </head> <body> <link rel="stylesheet" href="tinytable/tinytable.css" /> <table id="my\_table" class="tinytable"> <thead> <tr> <th style="width:60px"><h3>編號</h3></th> <th style="width:100px"><h3>開課單位</h3></th> <th style="width:100px"><h3>學程</h3></th> <th><h3>課程名稱</h3></th> <th style="width:60px"><h3>人數</h3></th> <th style="width:70px"><h3>學分數</h3></th> <th style="width:70px"><h3>星期幾</h3></th> </tr> </thead> <tbody>
<?php echo $tbody;?>
</tbody> </table>
**<div style="width:980px;margin:10px auto;">**
共 <span id="totalpages"></span> 頁 <img src="tinytable/images/first.gif" alt="最前頁" onclick="sorter.move(-1,true)" /> <img src="tinytable/images/previous.gif" alt="上一頁" onclick="sorter.move(-1)" /> <span id="currentpage"></span> <img src="tinytable/images/next.gif" alt="下一頁" onclick="sorter.move(1)" /> <img src="tinytable/images/last.gif" alt="最後頁" onclick="sorter.move(1,true)" /> <select id="columns" onchange="sorter.search('query')" style="width:80px;"></select> <input type="text" id="query" onkeyup="sorter.search('query')" size=8 /> 共 <span id="totalrecords"></span> 筆資料,目前顯示第 <span id="startrecord"></span>~<span id="endrecord"></span> 筆資料 <a href="javascript:sorter.reset()">重來</a> <a href="javascript:sorter.showall()">顯示全部</a> <select onchange="sorter.size(this.value)"> <option value="5">5</option> <option value="10">10</option> <option value="15">15</option> <option value="20">20</option> <option value="50">50</option> </select>
**</div>**
**<div style="display:none;">**
<div id="tablenav">切換到第 <select id="pagedropdown"></select> 頁</div>
**</div>**
<script type="text/javascript" src="tinytable/script.js"></script> <script type="text/javascript"> var sorter = new TINY.table.sorter('sorter','my\_table',{ headclass:'head', ascclass:'asc', descclass:'desc', evenclass:'evenrow', oddclass:'oddrow', evenselclass:'evenselected', oddselclass:'oddselected', paginate:true, size:10, colddid:'columns', currentid:'currentpage', totalid:'totalpages', startingrecid:'startrecord', endingrecid:'endrecord', totalrecid:'totalrecords', hoverid:'selectedrow', pageddid:'pagedropdown', navid:'tablenav', sortcolumn:0, sortdir:1,
**sum:\[4,5\], avg:\[4,5,6\], columns:\[{index:4,format:'人',decimals:0},{index:5,format:'節',decimals:0}\],**
init:true }); </script> </body> </html>
:::
搜尋
search
進階搜尋
QR Code 區塊
快速登入
所有討論區
「PHP全端開發」線上課程討論區
XOOPS使用討論區
一般研習學員
社大學員專用
路過哈啦區
XOOPS佈景設計
XOOPS模組開發
Tad書籍區
即時留言簿
書籍目錄
展開
|
闔起
線上使用者
51
人線上 (
11
人在瀏覽
線上書籍
)
會員: 0
訪客: 51
更多…