在判断表单单选框是否被选中时,通常会想到使用$('#checkbox').attr('checked')来判断,但在一些情况下,你会发现这种方法并不管用,得到的是undefined. 原来jQuery在1.6版本以后对属性选择器做了一些调整,分为.attr()和.prop()两种方法.为的是区分元素attributes和properties之间模棱两可的东西. 那么它们之间有什么区别呢? 官方的解释是: Attributes vs. Properties The difference betwe
学习此连接的总结http://developer.51cto.com/art/201009/226158.htmcss样式表中四种属性选择器1> 简易属性 tag[class]{ font-weight:bold } It will affect all tag with any class. e.g. <h2 class="old" > or <h2 class="new">2>精确属性值 a[href="http:/