//PageBar(資料數, 每頁顯示幾筆資料, 最多顯示幾個頁數選項); mysql_query($sql); $total=mysql_affected_rows(); $navbar = new PageBar($total, 20, 10); $mybar = $navbar->makeBar(); $bar= "{$mybar['left']}{$mybar['center']}{$mybar['right']}"; $sql.=$mybar['sql']; ``` 4. 「$bar」即分頁工具,將之擺至適當位置即可。 ### 二、 所見即所得編輯器 CKEditor 用法([http://ckeditor.com/](http://ckeditor.com)) 1. 方法一: ``` ``` 3. 方法二: ``` 請輸入內容 ``` 5. 自行定義工具列:[http://docs.cksource.com/CKEditor\_3.x/Developers\_Guide/Toolbar](http://docs.cksource.com/CKEditor_3.x/Developers_Guide/Toolbar) 6. 例如(config,js): ``` CKEDITOR.editorConfig = function( config ) { config.toolbar = 'MyToolbar'; config.toolbar_MyToolbar = [ { name: 'clipboard', items : [ 'Undo','Redo' ] }, { name: 'insert', items : [ 'Image' , 'Flash' , 'Table' , 'HorizontalRule' , 'Smiley' , 'PageBreak' ] }, { name: 'basicstyles', items : [ 'Bold' , 'Italic' , 'Strike' , 'RemoveFormat' ] }, { name: 'paragraph', items : [ 'NumberedList' , 'BulletedList' , 'Outdent' , 'Indent'] }, { name: 'links', items : [ 'Link' , 'Unlink' ] }, { name: 'styles', items : [ 'Styles' , 'Format' ] }, { name: 'tools', items : [ 'Font' , 'FontSize' ] } ]; }; ```
{$mybar['left']}{$mybar['center']}{$mybar['right']}
``` 3. 方法二: ``` 請輸入內容 ``` 5. 自行定義工具列:[http://docs.cksource.com/CKEditor\_3.x/Developers\_Guide/Toolbar](http://docs.cksource.com/CKEditor_3.x/Developers_Guide/Toolbar) 6. 例如(config,js): ``` CKEDITOR.editorConfig = function( config ) { config.toolbar = 'MyToolbar'; config.toolbar_MyToolbar = [ { name: 'clipboard', items : [ 'Undo','Redo' ] }, { name: 'insert', items : [ 'Image' , 'Flash' , 'Table' , 'HorizontalRule' , 'Smiley' , 'PageBreak' ] }, { name: 'basicstyles', items : [ 'Bold' , 'Italic' , 'Strike' , 'RemoveFormat' ] }, { name: 'paragraph', items : [ 'NumberedList' , 'BulletedList' , 'Outdent' , 'Indent'] }, { name: 'links', items : [ 'Link' , 'Unlink' ] }, { name: 'styles', items : [ 'Styles' , 'Format' ] }, { name: 'tools', items : [ 'Font' , 'FontSize' ] } ]; }; ```
請輸入內容 ``` 5. 自行定義工具列:[http://docs.cksource.com/CKEditor\_3.x/Developers\_Guide/Toolbar](http://docs.cksource.com/CKEditor_3.x/Developers_Guide/Toolbar) 6. 例如(config,js): ``` CKEDITOR.editorConfig = function( config ) { config.toolbar = 'MyToolbar'; config.toolbar_MyToolbar = [ { name: 'clipboard', items : [ 'Undo','Redo' ] }, { name: 'insert', items : [ 'Image' , 'Flash' , 'Table' , 'HorizontalRule' , 'Smiley' , 'PageBreak' ] }, { name: 'basicstyles', items : [ 'Bold' , 'Italic' , 'Strike' , 'RemoveFormat' ] }, { name: 'paragraph', items : [ 'NumberedList' , 'BulletedList' , 'Outdent' , 'Indent'] }, { name: 'links', items : [ 'Link' , 'Unlink' ] }, { name: 'styles', items : [ 'Styles' , 'Format' ] }, { name: 'tools', items : [ 'Font' , 'FontSize' ] } ]; }; ```
CKEDITOR.editorConfig = function( config ) { config.toolbar = 'MyToolbar'; config.toolbar_MyToolbar = [ { name: 'clipboard', items : [ 'Undo','Redo' ] }, { name: 'insert', items : [ 'Image' , 'Flash' , 'Table' , 'HorizontalRule' , 'Smiley' , 'PageBreak' ] }, { name: 'basicstyles', items : [ 'Bold' , 'Italic' , 'Strike' , 'RemoveFormat' ] }, { name: 'paragraph', items : [ 'NumberedList' , 'BulletedList' , 'Outdent' , 'Indent'] }, { name: 'links', items : [ 'Link' , 'Unlink' ] }, { name: 'styles', items : [ 'Styles' , 'Format' ] }, { name: 'tools', items : [ 'Font' , 'FontSize' ] } ]; }; ```
進階搜尋
395人線上 (147人在瀏覽線上書籍)
會員: 0
訪客: 395