如何设置数据属性而不在jQuery中添加值?我要这个:
<body data-body>
我试过了:
$('body').attr('data-body'); // this is a getter, not working
$('body').attr('data-body', null); // not adding anything
其他所有内容似乎都将第二个参数添加为字符串。是否可以只设置没有值的属性?
繁花不似锦
阿波罗的战车
相关分类