摘要: 设置元素属性,用attr()还是prop()? 对于取值为true /false的属性,如 checked/selected/readonly或者disabled,使用prop(),其他属性使用 attr()。 比如:$('input:checkbox').attr('checked',fasle) 阅读全文
posted @ 2017-02-27 13:55 开发之路 阅读(465) 评论(0) 推荐(1) 编辑