我想从此图片中删除id属性:
<img width="270" class="thumb" id="thumb" height="270" src="img/1_1.jpg" />
Run Code Online (Sandbox Code Playgroud)
我试过这样做:
$('img#thumb').RemoveAttr('id','none');
Run Code Online (Sandbox Code Playgroud)
但它不是删除ID!
编辑:
$('img#thumb').attr('src', response);
$('img#thumb').attr('id', 'nonthumb');
Run Code Online (Sandbox Code Playgroud)
这个deosnt加载图片,或者在这种情况下是src!但是当我删除id属性时,它工作正常