您的位置:首页 > 运维架构

JQ中的attr和prop方法

2016-07-26 18:04 330 查看
啥也不说了,注意坑,如果你在使用attr的时候发现明明在行间已经加上了该属性但实际却无法生效那就尝试一下prop吧!贴一张官方推荐的是使用attr还是prop的表格:

Attribute/Property
.attr()
.prop()
accesskey 
align 
async
autofocus
checked
class 
contenteditable 
draggable 
href 
id 
label 
location ( i.e. window.location )
multiple
readOnly
rel 
selected
src 
tabindex 
title 
type 
width ( if needed over 
.width()
 )
 
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: