运用jquery实现table单双行不同显示并能单行选中

时间:2009-07-25    点击:129   
复制代码 代码如下:

$(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 将disabled的元素置为enabled的三种方法
javaScript 判断字符串是否为数字的简单方法
利用javascript/jquery对上传文件格式过滤的方法
javascript 动态table添加colspan\rowspan 参数的方法
jquery 表单下所有元素的隐藏
> 返回     
地址:上海市普陀区胶州路941号长久商务中心 电话: QQ:
© Copyright 2012 上海网络 Product All Rights Reserved