jquery 属性操作

通用设置两种方式

第一种方式:

$('').attr();

$('').removeAttr();


第二种方式:

$('').prop();

$('').removeProp();


css类属性

扫描二维码关注公众号,回复: 555255 查看本文章

$('').addClass();

$('').removeClass();

$('').toggleClass();


html属性

$('').html();


文本属性

$('').text();


值属性

$('').val();






猜你喜欢

转载自blog.csdn.net/dxm809/article/details/80274284
今日推荐