$("#tableEmail td[background-color = dodgerblue]");
background-color为rgb格式,不是dodgerblue
建议你使用class设置背景颜色
你可以这样
有2个方法
1,使用Color.js,下载使用方法参见name2rgb http://matthewbj.github.io/Colors/
2,使用json预定义
http://stackoverflow.com/questions/1573053/javascript-function-to-convert-color-names-to-hex-codes
有2个方法
1,使用Color.js,下载使用方法参见name2rgb http://matthewbj.github.io/Colors/
2,使用json预定义
http://stackoverflow.com/questions/1573053/javascript-function-to-convert-color-names-to-hex-codes
谢谢你,还有就是为什么select.next()得不到下一个单元格?
有2个方法
1,使用Color.js,下载使用方法参见name2rgb http://matthewbj.github.io/Colors/
2,使用json预定义
http://stackoverflow.com/questions/1573053/javascript-function-to-convert-color-names-to-hex-codes
谢谢你,还有就是为什么select.next()得不到下一个单元格?
我知道为什么了,因为各个td位于不同的tr中,并不是兄弟关系,而我的td都只有1个,所以select.next()为空。正确的做法是select.parent().next().children().first(),先得到父元素tr,然后得到下一个tr,再得到tr所有子元素td,最后得到第一个子元素td即我们看到的下一个单元格了。