所以这是我的代码:
<input type = checkbox id = "kinch" name = "link" > Bunz </input>
<div id = bootypipe></div>
这是JavaScript:
$("#kinch").click(function(){
if ($("#kinch").is(":checked")) {
//Add image to div bootypipe
$("#bootypipe").append("<image id = 'chink' src = 'http://4.bp.blogspot.com/_TUdhYRa2Xm0/RsuDa4NvSEI/AAAAAAAAAQs/jr_r6v_SUgs/s320/New-England-Style-Hot-Dog-Buns_8A827671.jpg'>HA!</image>");
} else {
$("#chink").remove();
}
});
这是jsfiddle:http: //jsfiddle.net/shrimpboyho/wUu34/13/
图像删除并附加,但是当我删除图像时,文本Ha!
仍然保留并随着时间的推移而增加。我怎样才能删除这个?