jquery 属性操作

通用设置两种方式

第一种方式:

$('').attr();

$('').removeAttr();


第二种方式:

$('').prop();

$('').removeProp();


css类属性

$('').addClass();

$('').removeClass();

$('').toggleClass();


html属性

$('').html();


文本属性

$('').text();


值属性

$('').val();






原文地址:https://www.cnblogs.com/dxmfans/p/9434710.html