jquery删除节点 jquery删除html标签
jquery删除节点 jquery删除html标签
先看效果:
<DIV id="Previewpics"> <LI id="fileid16"><IMG src="http://127.0.0.1/uploads/201005/127311533698.gif.thumb_100_75.jpg"><BR> <INPUT onclick="window.open(this.src)" type="button" src="uploads/201005/127311533698.gif" value="大图"> <INPUT onclick="deleteimg(this.src)" type="button" src="16" value="删除"> </LI> <LI id="fileid17"><IMG src="http://127.0.0.1/uploads/201005/127311534291.jpg.thumb_100_75.jpg"><BR> <INPUT onclick="window.open(this.src)" type="button" src="uploads/201005/127311534291.jpg" value="大图"> <INPUT onclick="deleteimg(this.src)" type="button" src="17" value="删除"> </LI> <LI id="fileid18"><IMG src="http://127.0.0.1/uploads/201005/127311536399.gif.thumb_100_75.jpg"><BR> <INPUT onclick="window.open(this.src)" type="button" src="uploads/201005/127311536399.gif" value="大图"> <INPUT onclick="deleteimg(this.src)" type="button" src="18" value="删除"> </LI></DIV>
<DIV id="Previewpics"> <LI id="fileid16"><IMG src="http://127.0.0.1/uploads/201005/127311533698.gif.thumb_100_75.jpg"><BR> <INPUT onclick="window.open(this.src)" type="button" src="uploads/201005/127311533698.gif" value="大图"> <INPUT onclick="deleteimg(this.src)" type="button" src="16" value="删除"> </LI> <LI id="fileid17"><IMG src="http://127.0.0.1/uploads/201005/127311534291.jpg.thumb_100_75.jpg"><BR> <INPUT onclick="window.open(this.src)" type="button" src="uploads/201005/127311534291.jpg" value="大图"> <INPUT onclick="deleteimg(this.src)" type="button" src="17" value="删除"> </LI></DIV>
$('li').remove('#fileid'+fid);