HTML内容:
<div class="write-upload"> <p class="write-files old-files"> <i class="ico ico-wjj"></i>policycustom1.xml<span onclick="deleteAttachment(this)">x</span> </p> <p class="write-files old-files"> <i class="ico ico-wjj"></i>bee2.jpg<span onclick="deleteAttachment(this)">x</span> </p> <p class="write-files old-files"> <i class="ico ico-wjj"></i>policycustom1.xml<span onclick="deleteAttachment(this)">x</span> </p> <p class="write-files old-files"> <i class="ico ico-wjj"></i>bee2_small.jpg<span onclick="deleteAttachment(this)">x</span> </p> <p class="write-files old-files"> <i class="ico ico-wjj"></i>bee2.jpg<span onclick="deleteAttachment(this)">x</span> </p> <input type="hidden" id="delNames" name="delNames" value=""> </div>
jQuery:
$(".write-files.old-files").remove();