jQuery."data() 方法向被选元素附加数据,或者从被选元素获取数据。
注释:这是底层级的方法;使用 .data() 更加方便。"W3C搬运过来的。
注释:这是底层级的方法;使用 .data() 更加方便。"W3C搬运过来的。
2017-04-10
$("input:eq(2)").attr('value',function(i,val){
return '通过function设置' + val
})
function中的参数分别为,当前元素的索引值,原先的属性值。
参考http://jquery.cuishifeng.cn/attr.html
return '通过function设置' + val
})
function中的参数分别为,当前元素的索引值,原先的属性值。
参考http://jquery.cuishifeng.cn/attr.html
2017-04-09
发现这句 class="aa bb imooc" 没有用
2017-04-08