使用jquery在div中添加image / s [英] add image/s inside a div with jquery
本文介绍了使用jquery在div中添加image / s的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
< button class =xx type =submitid =add_football>添加< / button>
我想添加图片(< img src =img / door-right.png> $ c $
< div class =ball_footballbox>< img src< / div>
我该如何使用jQuery?
解决方案
或
$ ('< img src =img / door-right.png>')。appendTo(。ball_footballbox);
Every time I click on a button
<button class="xx type="submit" id="add_football">Add</button>
I want to add a image(<img src="img/door-right.png">
)inside the
<div class="ball_footballbox"><img src</div>
How do I do that with jQuery?
解决方案
Or
$('<img src="img/door-right.png">').appendTo(".ball_footballbox");
这篇关于使用jquery在div中添加image / s的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文