jquery.dataTables表格中的內容怎麼設置讓它不自動換行

在table中增長 style="white-space: nowrap;" ,這樣會撐大td。會出現滾動條

其餘內容配置:
每列寬度:
 "aoColumnDefs": [
	    	                  { "sWidth": "10%", "aTargets": [ 0 ] },
	    	                  { "sWidth": "12%", "aTargets": [ 1 ] },
	    	                  { "sWidth": "10%", "aTargets": [ 2 ] },
	    	                  { "sWidth": "10%", "aTargets": [ 3 ] },
	    	                  { "sWidth": "48%", "aTargets": [ 4 ] },
	    	                  { "sWidth": "10%", "aTargets": [ 5 ] }
	    	                ],

 dataTables去掉搜索框和每頁多少條框體java

$(document).ready(function() {
	    $('#example').dataTable( {
	        "processing": true,
	        "serverSide": true,
	        "searching" : false,
	        "bSort": false,
	        "bLengthChange":false,
	        "ajax": {
	        	url:"getSqlLogs",
	        	data:{"index":index,"type":type}
	        },
			"columns": [
				{ "data": "rowId" },
				{ "data": "message" },				
				{ "data": "type" },
				{ "data": "timestamp" },
			],
			language: {
		        "sProcessing": "處理中...",
		        "sLengthMenu": "顯示 _MENU_ 項結果",
		        "sZeroRecords": "沒有匹配結果",
		        "sInfo": "顯示第 _START_ 至 _END_ 項結果,共 _TOTAL_ 項",
		        "sInfoEmpty": "顯示第 0 至 0 項結果,共 0 項",
		        "sInfoFiltered": "(由 _MAX_ 項結果過濾)",
		        "sInfoPostFix": "",
		        "sSearch": "搜索:",
		        "sUrl": "",
		        "sEmptyTable": "表中數據爲空",
		        "sLoadingRecords": "載入中...",
		        "sInfoThousands": ",",
		        "oPaginate": {
		            "sFirst": "首頁",
		            "sPrevious": "上頁",
		            "sNext": "下頁",
		            "sLast": "末頁"
		        },
		        "oAria": {
		            "sSortAscending": ": 以升序排列此列",
		            "sSortDescending": ": 以降序排列此列"
		        }
		    }  
	    } );
	} );
相關文章
相關標籤/搜索