最佳答案
我想从这张图片中移除 id 属性:
<img width="270" class="thumb" id="thumb" height="270" src="img/1_1.jpg" />
我试过这么做:
$('img#thumb').RemoveAttr('id','none');
但它没有移除 ID!
编辑:
$('img#thumb').attr('src', response);
$('img#thumb').attr('id', 'nonthumb');
这个 deosnt 加载图片,或者在这种情况下 src!但是当我删除 id 属性时,它可以正常工作