DataTables 테이블 백그라운드 데이터 추출

2260 단어 datatables
<script type="text/javascript" language="javascript" class="init">
	$(document).ready(function() {
		$('#extable').dataTable({
			"bAutoWidth": false, //     
			"aaSorting": [[0, "asc"]],
			"lengthMenu": [10, 20, 30],
			"pagingType": "full_numbers",
			 "language": {
			"processing": "     ......",
            "lengthMenu": "     _MENU_    ",
            "zeroRecords": "   ,        !",
            "info": "   page _PAGE_ of _PAGES_",//     _START_   _END_  ,  _TOTAL_    
            "infoEmpty": "     ",
            "infoFiltered": "(filtered from _MAX_ total records)",
            "search": "  ",
            "paginate": {
                        "sFirst": "  ",
                        "sPrevious": "   ",
                        "sNext": "   ",
                        "sLast": "  "
                    }
        	},
			"processing": true,
			"ajax": {
				"url": "http://localhost:8081/irpuser/api/v1/community/2/person",
				"data": function (data) {
					return data;
				}
			},
			"columns": [
			{ "data": "personId" },
            { "data": "personName" },
            { "data": "personType" },
            { "data": "innerCode" }
        	]
			/**
        	"serverSide": true,
			"ajax": {
            "url": "http://localhost:8081/irpuser/api/v1/community/2/person",
            "data": function ( d ) {
            	alert(d);
                d.myKey = "myValue";
                // d.custom = $('#myInput').val();
                // etc
            	}
        	}
        	*/
		});
	} );
	</script>

좋은 웹페이지 즐겨찾기