I checked some information and wrote 4 demos:
1. Interlaced coloring
$('#table1 tr:odd').addClass('odd');
$('#table1 tr:even').addClass('even');
Effect:
2. Highlight the rows containing specific data
$("#table2 tr:contains('Fuck')").addClass("selected");
3. Filter data
$("#filter ").click(
function(){
$("#table3 .datarow").hide().filter(":contains('ABCDEFG')").show();
}
);
4. Instantly filter data based on user input
$("#keyword").keyup(function(){
$("#table3 .datarow").hide().filter(":contains('" ($(this).val()) "')").show();
}).keyup();
Before screening:
Enter ck:
Online demohttp://demo.jb51.net/js/2012/JQueryTableExample/
Package downloadJQueryTableExample_Edi.rar
Statement:The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn