jQuery 中 attr() 跟 prop() 方法的区别
jQuery 中 attr() 和 prop() 方法的区别
具有 true 和 false 两个属性的属性,如 checked, selected 或者 disabled 使用prop(),其他的使用 attr(),具体见下表: