运用jquery实现table单双行不同显示并能单行选中
摘要:复制代码代码如下:$(document).ready(function(){$("p:odd").css("background-color...
复制代码 代码如下:
$(document).ready(function(){
$("p:odd").css("background-color", "#bbf");
$("p:even").css("background-color","#ffc");
$("p").click(function () {
$("p").each(function(){
if($(this).hasClass("highlight")){
$(this).removeClass("highlight");
}});
$(this).addClass("highlight");
});
});
源码参考gamil:test_jquery_table
【运用jquery实现table单双行不同显示并能单行选中】相关文章:
★ jQuery实现控制文字内容溢出用省略号(…)表示的方法
★ javascript实现table选中的行以指定颜色高亮显示
下一篇:
jquery 表单下所有元素的隐藏