datatables參數配置詳解
- $(document).ready( function (){
- $(‘selector‘).dataTable( {
-
- "bAutoWidth":true,
-
- "bDeferRender":false,
-
- "bFilter":true,
-
- "bInfo":true,
-
- "bJQueryUI":false,
-
- "bLengthChange":false,
-
- "bPaginage":true,
-
- "bProcessing":false,
-
- "bScrollInfinite":false,
-
- "bServerSide":false,
-
- "bSort":true,
-
- "bSortClasses":true,
-
- "bStateSave":false,
-
- "sScrollX":"100%",
-
- "sScrollY":"100%",
-
- "oLanguage":{
- "oAria":{
-
- "sSortAscending": " - click/return to sort ascending",
-
- "sSortDescending": " - click/return to sort descending"
- },
- "oPaginate": {
-
- "sFirst": "First page",
-
- "sLast": "Last page",
-
- "sNext": "Next page",
-
- "sPrevious": "Previous page"
- },
-
- "sEmptyTable": "No data available in table",
-
- "sInfo": "Got a total of _TOTAL_ entries to show (_START_ to _END_)",
-
- "sInfoEmpty": "No entries to show",
-
- "sInfoFiltered": " - filtering from _MAX_ records",
-
- "sInfoPostFix": "All records shown are derived from real information.",
-
- "sInfoThousands": "‘",
-
- "sLengthMenu": "Display _MENU_ records",
-
- "sLoadingRecords": "Please wait - loading...",
-
- "sProcessing": "DataTables is currently busy",
-
- "sSearch": "Apply filter _INPUT_ to table",
-
- "sUrl": "http://www.sprymedia.co.uk/dataTables/lang.txt",
-
- "sZeroRecords": "No records to display"
- }
- });
- });
-
-
-
- $(‘selector‘).dataTable({
- "bFilter": false,
- "bDestroy": true
- });
-
-
- $(document).ready(function(){
- initTable();
- tableActions();
- });
-
- function initTable()
- {
- return $(‘#example‘).dataTable( {
- "sScrollY": "200px",
- "bPaginate": false,
- "bRetrieve": true
- });
- }
-
- function tableActions()
- {
- var oTable = initTable();
-
- }
-
-
- $(document).ready(function(){
- $(‘#example‘).dataTable( {
- "bScrollAutoCss": false,
- "sScrollY": "200px"
- });
- });
-
-
- $(document).ready(function(){
- $(‘#example‘).dataTable( {
- "sScrollY": "200",
- "bScrollCollapse": true
- });
- });
-
-
- $(document).ready(function(){
- $(‘#example‘).dataTable( {
- "bSortCellsTop": true
- });
- });
-
-
- $(document).ready(function(){
- $(‘#example‘).dataTable( {
- "iCookieDuration": 60*60*24
- });
- })
-
-
- $(document).ready(function(){
- $(‘#example‘).dataTable( {
- "bServerSide": true,
- "sAjaxSource": "scripts/server_processing.php",
- "iDeferLoading": 57
- });
- });
-
-
- $(document).ready(function(){
- $(‘#example‘).dataTable( {
- "bServerSide": true,
- "sAjaxSource": "scripts/server_processing.php",
- "iDeferLoading": 57
- });
- });
-
-
- $(document).ready(function(){
- $(‘#example‘).dataTable( {
- "iDisplayStart": 20
- });
- })
-
-
- $(document).ready(function(){
- $(‘#example‘).dataTable( {
- "bScrollInfinite": true,
- "bScrollCollapse": true,
- "sScrollY": "200px",
- "iScrollLoadGap": 50
- });
- });
-
-
- $(document).ready(function(){
- $(‘#example‘).dataTable( {
- "iTabIndex": 1
- });
- });
-
-
- $(document).ready(function(){
- $(‘#example‘).dataTable( {
- "oSearch": {"sSearch": "Initial search"}
- });
- })
-
-
-
- $(document).ready(function(){
- var oTable = $(‘#example‘).dataTable( {
- "sAjaxSource": "sources/data.txt",
- "sAjaxDataProp": "data"
- });
- });
-
-
- $(document).ready(function(){
- var oTable = $(‘#example‘).dataTable( {
- "sAjaxSource": "sources/data.txt",
- "sAjaxDataProp": "data.inner"
- });
- });
-
-
- $(document).ready(function(){
- $(‘#example‘).dataTable( {
- "sAjaxSource": "http://www.sprymedia.co.uk/dataTables/json.php"
- });
- })
-
-
- $(document).ready(function(){
- $(‘#example‘).dataTable( {
- "sCookiePrefix": "my_datatable_",
- });
- });
-
-
- $(document).ready(function(){
- $(‘#example‘).dataTable( {
- "sDom": ‘<"top"i>rt<"bottom"flp><"clear"&lgt;‘
- });
- });
-
-
- $(document).ready(function(){
- $(‘#example‘).dataTable( {
- "sPaginationType": "full_numbers"
- });
- })
-
-
- $(document).ready(function(){
- $(‘#example‘).dataTable( {
- "sScrollX": "100%",
- "sScrollXInner": "110%"
- });
- });
-
-
- $(document).ready(function(){
- $(‘#example‘).dataTable({
- "bServerSide": true,
- "sAjaxSource": "scripts/post.php",
- "sServerMethod": "POST"
- });
- });
-
-
- $(document).ready(function (){
- $(‘#example‘).dataTable({
- "fnCookieCallback": function (sName, oData, sExpires, sPath) {
-
- return sName + "="+JSON.stringify(oData)+"; expires=" + sExpires +"; path=" + sPath;
- }
- });
- });
-
-
- $(document).ready(function(){
- $(‘#example‘).dataTable({
- "fnCreatedRow": function( nRow, aData, iDataIndex ){
-
- if ( aData[4] == "A" )
- {
- $(‘td:eq(4)‘, nRow).html( ‘<b>A</b>‘ );
- }
- }
- });
- });
-
-
- $(document).ready( function(){
- $(‘#example‘).dataTable({
- "fnDrawCallback": function(){
- alert( ‘DataTables has redrawn the table‘ );
- }
- });
- });
-
-
- $(document).ready( function(){
- $(‘#example‘).dataTable({
- "fnDrawCallback": function() {
- alert( ‘DataTables has redrawn the table‘ );
- }
- });
- });
-
-
- $(document).ready(function(){
- $(‘#example‘).dataTable({
- "fnFormatNumber": function ( iIn ) {
- if ( iIn < 1000 ) {
- return iIn;
- } else {
- var
- s=(iIn+""),
- a=s.split(""), out="",
- iLen=s.length;
-
- for ( var i=0 ; i<iLen ; i++ ) {
- if ( i%3 === 0 && i !== 0 ) {
- out = "‘"+out;
- }
- out = a[iLen-i-1]+out;
- }
- }
- return out;
- };
- });
- });
-
-
- $(document).ready(function(){
- $(‘#example‘).dataTable({
- "fnFormatNumber": function ( iIn ) {
- if ( iIn < 1000 ) {
- return iIn;
- } else {
- var
- s=(iIn+""),
- a=s.split(""), out="",
- iLen=s.length;
-
- for ( var i=0 ; i<iLen ; i++ ) {
- if ( i%3 === 0 && i !== 0 ) {
- out = "‘"+out;
- }
- out = a[iLen-i-1]+out;
- }
- }
- return out;
- };
- });
- });
-
-
- $(‘#example‘).dataTable( {
- "fnInfoCallback": function( oSettings, iStart, iEnd, iMax, iTotal, sPre ) {
- return iStart +" to "+ iEnd;
- }
- });
-
-
- $(document).ready( function(){
- $(‘#example‘).dataTable({
- "fnInitComplete": function(oSettings, json) {
- alert( ‘DataTables has finished its initialisation.‘ );
- }
- });
- })
-
-
- $(document).ready( function(){
- $(‘#example‘).dataTable({
- "fnPreDrawCallback": function( oSettings ) {
- if ( $(‘#test‘).val() == 1 ) {
- return false;
- }
- }
- });
- });
-
-
- $(document).ready(function(){
- $(‘#example‘).dataTable({
- "fnRowCallback": function( nRow, aData, iDisplayIndex, iDisplayIndexFull ) {
-
- if ( aData[4] == "A" )
- {
- $(‘td:eq(4)‘, nRow).html( ‘<b>A</b>‘ );
- }
- }
- });
- });
-
-
-
- $(document).ready(function(){
- $(‘#example‘).dataTable( {
- "bProcessing": true,
- "bServerSide": true,
- "sAjaxSource": "xhr.php",
- "fnServerData": function ( sSource, aoData, fnCallback ) {
- $.ajax( {
- "dataType": ‘json‘,
- "type": "POST",
- "url": sSource,
- "data": aoData,
- "success": fnCallback
- } );
- }
- });
- });
-
-
- $(document).ready(function(){
- $(‘#example‘).dataTable( {
- "bProcessing": true,
- "bServerSide": true,
- "sAjaxSource": "scripts/server_processing.php",
- "fnServerParams": function ( aoData ) {
- aoData.push( { "name": "more_data", "value": "my_value" } );
- }
- });
- });
-
-
- $(document).ready(function(){
- $(‘#example‘).dataTable({
- "bStateSave": true,
- "fnStateSave": function (oSettings, oData) {
- var o;
-
-
-
- $.ajax( {
- "url": "/state_load",
- "async": false,
- "dataType": "json",
- "success": function (json) {
- o = json;
- }
- } );
- return o;
- }
- });
- });
-
-
-
- $(document).ready(function(){
- $(‘#example‘).dataTable({
- "bStateSave": true,
- "fnStateLoadParams": function (oSettings, oData) {
- oData.oFilter.sSearch = "";
- });
- });
-
-
-
- $(document).ready(function(){
- $(‘#example‘).dataTable({
- "bStateSave": true,
- "fnStateLoadParams": function (oSettings, oData) {
- return false;
- });
- });
-
-
-
- $(document).ready(function(){
- $(‘#example‘).dataTable({
- "bStateSave": true,
- "fnStateLoaded": function (oSettings, oData) {
- alert( ‘Saved filter was: ‘+oData.oFilter.sSearch );
- });
- });
-
-
- $(document).ready(function(){
- $(‘#example‘).dataTable({
- "bStateSave": true,
- "fnStateSave": function (oSettings, oData) {
-
- $.ajax( {
- "url": "/state_save",
- "data": oData,
- "dataType": "json",
- "method": "POST"
- "success": function () {}
- });
- }
- });
- });
-
-
-
- $(document).ready(function(){
- $(‘#example‘).dataTable({
- "bStateSave": true,
- "fnStateLoadParams": function (oSettings, oData) {
- oData.oFilter.sSearch = "";
- });
- });
-
-
-
- $(document).ready(function(){
- $(‘#example‘).dataTable({
- "aoColumnDefs": [
- { "aDataSort": [ 0, 1 ], "aTargets": [ 0 ] },
- { "aDataSort": [ 1, 0 ], "aTargets": [ 1 ] },
- { "aDataSort": [ 2, 3, 4 ], "aTargets": [ 2 ] }
- ]
- });
- });
-
-
-
- $(document).ready(function(){
- $(‘#example‘).dataTable({
- "aoColumns": [
- { "aDataSort": [ 0, 1 ] },
- { "aDataSort": [ 1, 0 ] },
- { "aDataSort": [ 2, 3, 4 ] },
- null,
- null
- ]
- });
- });
-
-
-
- $(document).ready(function(){
- $(‘#example‘).dataTable({
- "aoColumnDefs": [
- { "asSorting": [ "asc" ], "aTargets": [ 1 ] },
- { "asSorting": [ "desc", "asc", "asc" ], "aTargets": [ 2 ] },
- { "asSorting": [ "desc" ], "aTargets": [ 3 ] }
- ]
- });
- });
-
-
-
- $(document).ready(function(){
- $(‘#example‘).dataTable( {
- "aoColumns": [
- null,
- { "asSorting": [ "asc" ] },
- { "asSorting": [ "desc", "asc", "asc" ] },
- { "asSorting": [ "desc" ] },
- null
- ]
- });
- });
-
-
-
- $(document).ready(function(){
- $(‘#example‘).dataTable({
- "aoColumnDefs": [
- { "bSearchable": false, "aTargets": [ 0 ] }
- ]} );
- });
-
-
-
- $(document).ready(function(){
- $(‘#example‘).dataTable({
- "aoColumns": [
- { "bSearchable": false },
- null,
- null,
- null,
- null
- ] });
- });
-
-
-
- $(document).ready(function(){
- $(‘#example‘).dataTable({
- "aoColumnDefs": [
- { "bSortable": false, "aTargets": [ 0 ] }
- ] });
- });
-
-
-
- $(document).ready(function(){
- $(‘#example‘).dataTable( {
- "aoColumns": [
- { "bSortable": false },
- null,
- null,
- null,
- null
- ] });
- });
-
-
-
- $(document).ready(function() {
- $(‘#example‘).dataTable( {
- "aoColumnDefs": [
- {
- "fnRender": function ( oObj ) {
- return oObj.aData[0] +‘ ‘+ oObj.aData[3];
- },
- "bUseRendered": false,
- "aTargets": [ 0 ]
- }
- ]
- } );
- } );
-
-
- $(document).ready(function() {
- $(‘#example‘).dataTable( {
- "aoColumns": [
- {
- "fnRender": function ( oObj ) {
- return oObj.aData[0] +‘ ‘+ oObj.aData[3];
- },
- "bUseRendered": false
- },
- null,
- null,
- null,
- null
- ]
- } );
- } );
-
-
-
- $(document).ready(function() {
- $(‘#example‘).dataTable( {
- "aoColumnDefs": [
- { "bVisible": false, "aTargets": [ 0 ] }
- ] } );
- } );
-
-
-
- $(document).ready(function() {
- $(‘#example‘).dataTable( {
- "aoColumns": [
- { "bVisible": false },
- null,
- null,
- null,
- null
- ] } );
- } );
-
-
- $(document).ready(function() {
- $(‘#example‘).dataTable( {
- "aoColumnDefs": [ {
- "aTargets": [3],
- "fnCreatedCell": function (nTd, sData, oData, iRow, iCol) {
- if ( sData == "1.7" ) {
- $(nTd).css(‘color‘, ‘blue‘)
- }
- }
- } ]
- });
- } );
-
-
-
- $(document).ready(function() {
- $(‘#example‘).dataTable( {
- "aoColumnDefs": [
- {
- "fnRender": function ( o, val ) {
- return o.aData[0] +‘ ‘+ o.aData[3];
- },
- "aTargets": [ 0 ]
- }
- ]
- } );
- } );
-
-
-
- $(document).ready(function() {
- $(‘#example‘).dataTable( {
- "aoColumns": [
- { "fnRender": function ( o, val ) {
- return o.aData[0] +‘ ‘+ o.aData[3];
- } },
- null,
- null,
- null,
- null
- ]
- } );
- } );
-
-
-
- $(document).ready(function() {
- $(‘#example‘).dataTable( {
- "aoColumnDefs": [
- { "iDataSort": 1, "aTargets": [ 0 ] }
- ]
- } );
- } );
-
-
- $(document).ready(function() {
- $(‘#example‘).dataTable( {
- "aoColumns": [
- { "iDataSort": 1 },
- null,
- null,
- null,
- null
- ]
- } );
- } );
-
-
-
- $(document).ready(function() {
- var oTable = $(‘#example‘).dataTable( {
- "sAjaxSource": "sources/deep.txt",
- "aoColumns": [
- { "mDataProp": "engine" },
- { "mDataProp": "browser" },
- { "mDataProp": "platform.inner" },
- { "mDataProp": "platform.details.0" },
- { "mDataProp": "platform.details.1" }
- ]
- } );
- } );
-
-
-
-
- $(document).ready(function() {
- var oTable = $(‘#example‘).dataTable( {
- "aoColumnDefs": [
- {
- "aTargets": [ 0 ],
- "mDataProp": function ( source, type, val ) {
- if (type === ‘set‘) {
- source.price = val;
-
- source.price_display = val=="" ? "" : "$"+numberFormat(val);
- source.price_filter = val=="" ? "" : "$"+numberFormat(val)+" "+val;
- return;
- }
- else if (type === ‘display‘) {
- return source.price_display;
- }
- else if (type === ‘filter‘) {
- return source.price_filter;
- }
-
- return source.price;
- }
- ]
- } );
- } );
-
-
-
- $(document).ready(function() {
- $(‘#example‘).dataTable( {
- "aoColumnDefs": [
- { "sClass": "my_class", "aTargets": [ 0 ] }
- ]
- } );
- } );
-
-
- $(document).ready(function() {
- $(‘#example‘).dataTable( {
- "aoColumns": [
- { "sClass": "my_class" },
- null,
- null,
- null,
- null
- ]
- } );
- } );
-
-
-
- $(document).ready(function() {
- $(‘#example‘).dataTable( {
- "aoColumns": [
- null,
- null,
- null,
- {
- "sContentPadding": "mmm"
- }
- ]
- } );
- } );
-
-
-
- $(document).ready(function() {
- $(‘#example‘).dataTable( {
- "aoColumnDefs": [
- {
- "mDataProp": null,
- "sDefaultContent": "Edit",
- "aTargets": [ -1 ]
- }
- ]
- } );
- } );
-
-
-
- $(document).ready(function() {
- $(‘#example‘).dataTable( {
- "aoColumns": [
- null,
- null,
- null,
- {
- "mDataProp": null,
- "sDefaultContent": "Edit"
- }
- ]
- } );
- } );
-
-
-
- $(document).ready(function() {
- $(‘#example‘).dataTable( {
- "aoColumnDefs": [
- { "sName": "engine", "aTargets": [ 0 ] },
- { "sName": "browser", "aTargets": [ 1 ] },
- { "sName": "platform", "aTargets": [ 2 ] },
- { "sName": "version", "aTargets": [ 3 ] },
- { "sName": "grade", "aTargets": [ 4 ] }
- ]
- } );
- } );
-
-
-
- $(document).ready(function() {
- $(‘#example‘).dataTable( {
- "aoColumns": [
- { "sName": "engine" },
- { "sName": "browser" },
- { "sName": "platform" },
- { "sName": "version" },
- { "sName": "grade" }
- ]
- } );
- } );
-
-
-
- $(document).ready(function() {
- $(‘#example‘).dataTable( {
- "aoColumnDefs": [
- { "sSortDataType": "dom-text", "aTargets": [ 2, 3 ] },
- { "sType": "numeric", "aTargets": [ 3 ] },
- { "sSortDataType": "dom-select", "aTargets": [ 4 ] },
- { "sSortDataType": "dom-checkbox", "aTargets": [ 5 ] }
- ]
- } );
- } );
-
-
-
- $(document).ready(function() {
- $(‘#example‘).dataTable( {
- "aoColumns": [
- null,
- null,
- { "sSortDataType": "dom-text" },
- { "sSortDataType": "dom-text", "sType": "numeric" },
- { "sSortDataType": "dom-select" },
- { "sSortDataType": "dom-checkbox" }
- ]
- } );
- } );
-
-
-
- $(document).ready(function() {
- $(‘#example‘).dataTable( {
- "aoColumnDefs": [
- { "sTitle": "My column title", "aTargets": [ 0 ] }
- ]
- } );
- } );
-
-
-
- $(document).ready(function() {
- $(‘#example‘).dataTable( {
- "aoColumns": [
- { "sTitle": "My column title" },
- null,
- null,
- null,
- null
- ]
- } );
- } );
-
-
-
- $(document).ready(function() {
- $(‘#example‘).dataTable( {
- "aoColumnDefs": [
- { "sType": "html", "aTargets": [ 0 ] }
- ]
- } );
- } );
-
-
-
- $(document).ready(function() {
- $(‘#example‘).dataTable( {
- "aoColumns": [
- { "sType": "html" },
- null,
- null,
- null,
- null
- ]
- } );
- } );
-
-
-
- $(document).ready(function() {
- $(‘#example‘).dataTable( {
- "aoColumnDefs": [
- { "sWidth": "20%", "aTargets": [ 0 ] }
- ]
- } );
- } );
-
-
-
- $(document).ready(function() {
- $(‘#example‘).dataTable( {
- "aoColumns": [
- { "sWidth": "20%" },
- null,
- null,
- null,
- null
- ]
- } );
- } );
-
-
- $(document).ready( function () {
- $(‘#example‘).dataTable( {
- "bServerSide": true,
- "sAjaxSource": "xhr.php"
- } );
- } );
-
-
- $(document).ready(function() {
- $(‘#example‘).dataTable( {
- "bProcessing": true,
- "bServerSide": true,
- "sAjaxSource": "xhr.php",
- "fnServerData": function ( sSource, aoData, fnCallback ) {
- $.ajax( {
- "dataType": ‘json‘,
- "type": "POST",
- "url": sSource,
- "data": aoData,
- "success": fnCallback
- } );
- }
- } );
- } );
-
- $(document).ready(function() {
- $(‘#example‘).dataTable( {
- "bProcessing": true,
- "bServerSide": true,
- "sAjaxSource": "scripts/server_processing.php",
- "fnServerParams": function ( aoData ) {
- aoData.push( { "name": "more_data", "value": "my_value" } );
- }
- } );
- } );
-
-
- $(document).ready(function() {
- var oTable = $(‘#example‘).dataTable( {
- "sAjaxSource": "sources/data.txt",
- "sAjaxDataProp": "data"
- } );
- } );
-
-
-
- $(document).ready(function() {
- var oTable = $(‘#example‘).dataTable( {
- "sAjaxSource": "sources/data.txt",
- "sAjaxDataProp": "data.inner"
- } );
- } );
-
- $(document).ready(function(){
- $(‘#example‘).dataTable( {
- "sAjaxSource": "http://www.sprymedia.co.uk/dataTables/json.php"
- });
- })
-
- $(document).ready(function(){
- $(‘#example‘).dataTable({
- "bServerSide": true,
- "sAjaxSource": "scripts/post.php",
- "sServerMethod": "POST"
- });
- });
- var docrTable = $('#docrevisontable').dataTable({
- "bProcessing" : true,
- "bServerSide" : true,
- "bStateSave" : true,
- "bJQueryUI" : true,
- "sScrollY" : 450,
- "sScrollX" : 820,
- "aLengthMenu" : [20, 40, 60],
- "iDisplayLength" : 40,
- "bAutoWidth" : false,
-
- "bScrollCollapse" : true,
- "bPaginate" : true,
- "bInfo" : true,
- "sPaginationType" : "full_numbers",
- "bSort" : true,
- "aaSorting" : [[1, "asc"]],
- "bFilter" : true,
- "aoColumns" : [{
- "mDataProp" : "USERID",
- "sDefaultContent" : "",
- "bVisible" : false
- }, {
- "mDataProp" : "USERNAME",
- "sTitle" : "用戶名",
- "sDefaultContent" : "",
- "sClass" : "center"
- }, {
- "mDataProp" : "EMAIL",
- "sTitle" : "電子郵箱",
- "sDefaultContent" : "",
- "sClass" : "center"
- }, {
- "mDataProp" : "MOBILE",
- "sTitle" : "手機",
- "sDefaultContent" : "",
- "sClass" : "center"
- }, {
- "mDataProp" : "PHONE",
- "sTitle" : "座機",
- "sDefaultContent" : "",
- "sClass" : "center"
- }, {
- "mDataProp" : "NAME",
- "sTitle" : "姓名",
- "sDefaultContent" : "",
- "sClass" : "center"
- }, {
- "mDataProp" : "ISADMIN",
- "sTitle" : "用戶權限",
- "sDefaultContent" : "",
- "sClass" : "center"
- }],
- "oLanguage": {
- "sProcessing" : "正在獲取數據,請稍後...",
- "sLengthMenu" : "顯示 _MENU_ 條",
- "sZeroRecords" : "沒有您要搜索的內容",
- "sInfo" : "從 _START_ 到 _END_ 條記錄 總記錄數爲 _TOTAL_ 條",
- "sInfoEmpty" : "記錄數爲0",
- "sInfoFiltered" : "(所有記錄數 _MAX_ 條)",
- "sInfoPostFix" : "",
- "sSearch" : "搜索",
- "sUrl" : "",
- "oPaginate": {
- "sFirst" : "第一頁",
- "sPrevious" : "上一頁",
- "sNext" : "下一頁",
- "sLast" : "最後一頁"
- }
- },
-
- "fnRowCallback" : function(nRow, aData, iDisplayIndex) {
-
- if (aData.ISADMIN == '1')
- $('td:eq(5)', nRow).html('管理員');
- if (aData.ISADMIN == '2')
- $('td:eq(5)', nRow).html('資料下載');
- if (aData.ISADMIN == '3')
- $('td:eq(5)', nRow).html('通常用戶');
-
- return nRow;
- },
-
- "sAjaxSource" : "../use/userList.do?now=" + new Date().getTime(),
-
- "fnServerData" : function(sSource, aDataSet, fnCallback) {
- $.ajax({
- "dataType" : 'json',
- "type" : "POST",
- "url" : sSource,
- "data" : aDataSet,
- "success" : fnCallback
- });
- }
- });
-
- $("#docrevisontable tbody").click(function(event) {
- $(docrTable.fnSettings().aoData).each(function() {
- $(this.nTr).removeClass('row_selected');
- });
- $(event.target.parentNode).addClass('row_selected');
- var aData = docrTable.fnGetData(event.target.parentNode);
-
- $("#userId").val(aData.USERID);
- $("#userN").val(aData.USERNAME);
- });
-
- $('#docrevisontable_filter').html('<span>用戶管理列表');
- $('#docrevisontable_filter').append(' <input type="button" class="addBtn" id="addBut" value="建立"/>');
- $('#docrevisontable_filter').append(' <input type="button" class="addBtn" id="addBut" value="修改"/>');
- $('#docrevisontable_filter').append(' <input type="button" class="addBtn" id="addBut" value="刪除"/>');
- $('#docrevisontable_filter').append('</span>');
- }
歡迎關注本站公眾號,獲取更多信息