$ (document). Ready (function() { $ (' #example '). dataTable ({ "sdom": ' < "top" iflp< "Clear" >>rt< "bottom" ilp< "clear" >> " });
// Custom Layouts // * l-length changing * f-filtering input* t-the table!* i-information* p-pagination* r-processing* &L T and >-div elements* < "class" and >-div with a class * Examples: < "wrapper" FLIPT>, <lf<t>i P>
语法结构
/* <> represents a closed div example:<> = <div></div> < class name > represents a closed div example with a class name :< " Top "> = <div class=" Top "></div> L-Number of records displayed per row F-search box T-table I-table information P-pagination bar R- progress bar on Load * /
综合应用
Example:< "Top" iflp< "clear" >>rt< "bottom" ilp< "clear" >> represents <div class= "Top" > form information (i) search box (f) number of records displayed per row (l) pagination Bar (p) <div class= "clear" ></div> </div> Loading progress bar (bottom) table (t) <div class= "Top" > Tabular Information (i) Number of records displayed per row (l) pagination Bar (p) <div class= "clear" ></div> </div>
"Reprint" http://www.cnblogs.com/w3live/archive/2011/05/31/2064916.html
Jquery DataTables Custom Layouts