Bootstrap: un marco de desarrollo front-end simple, intuitivo, potente y móvil primero, lo que hace que el desarrollo web sea más rápido y simple. Presentemos el uso de tablas de arranque a continuación. Aprendamos juntos.
Defina primero la tabla front-end
<table id = "expandableAdatable"> </table>
Entonces JS
/** Initialize the table*/var oTable = $('#expandabledatatable').dataTable({"sDom": "Tflt<'row DTTTFooter'<'col-sm-6'i><'col-sm-6'p>>","aoColumnDefs": [{"bSortable": false, "aTargets": [0],"render": function (data, type, full) {return '<i> </i>';}}, {"atargets": [1], "data": "taskname", "title": "taskName"}, {"atargets": [2], "data": "cronexpression", "título": "expresión"}, {"atargets": [3], "data", "", "", "", "Observación": "Naciones "Descripción"}, {"bsortable": false, "atargets": [4], "title": "run status", "render": function (data, type, full) {if (full ["habilitado"] == true) {return '<button type = "botón"> ejecutar </botón>';} else {return '<booth' type = "Button"> stop </boton> ';}}}, {"bsortable": false, "atargets": [5], "render": function (data, type, full) {return' <a href = "#"> <i> </i> editar </a> <a href = "#"> <i> </i> Delete</a>';}}],"bServerSide": true,"sAjaxSource": "/Task/GetAllTask","aaSorting": [[1, 'asc']],"aLengthMenu": [[5, 15, 20, -1],[5, 15, 20, "All"]],"iDisplayLength": 5,"searching": false,"bLengthChange": falso, "lenguaje": {"sprobessing": "cargando datos ...", "sinfoEmpty": "registros son 0", "sinfoFiltered": "filtrado desde _max_bar", "szerorecords": "nada que quieras buscar", "buscar": "", "slengthmenu": "_menu _", "sinfo": " /Total_total_bar data "," opaginate ": {" sprevious ":" anterior ":" anterior "," snext ":" next ",}}," fnserverdata: function (ssource, aodata, fncallback) {$. .AJAX ({"tipo": "post", ":": ssource, "datatype" "json", "datos": {aodata: json.stringify (aodata)}, "éxito": function (resp) {fnCallback (resp);}});}});Los datos de esta tabla se obtienen desde el lado del servidor, por lo que las siguientes propiedades deben configurarse; de lo contrario, los datos no se pueden obtener desde el lado del servidor
"BServerside": True, "SajaxSource": "/Task/GetallTask", "fnServerData": function (ssource, aodata, fncallback) {$ .AJAX ({"tipo": 'post', "url": ssource, "dataTipo": "json", "datos": {aodata: Json.stringify (aodata)}, "éxito": function (resp) {fncallback (resp);}});}Lo anterior es el conocimiento relevante sobre el uso de formularios de arranque que le presentan el editor. Espero que te sea útil. Si tiene alguna pregunta, déjame un mensaje y el editor le responderá a tiempo. ¡Muchas gracias por su apoyo al sitio web de Wulin.com!