0
是否可以通过类添加图像到div中,比如当我点击.img123(img class)
插入.div123(div class)
时。 随着追加,我点击次数增加的按钮多少次,我只需要一次。它不是与类。我可以在div中添加图像吗?
$("#theDiv").append("img id='theImg' src='theImg.png'/>");
有什么功能有些像
('.img123').click(function() {
$('.img123'). adding image only one time into ('.div123');
});
首先:append(“”);你错过了开放的'<' – effone