我想补充的div结构每次按一下按钮我点击按钮添加使用jQuery
添加格上动态使用jQuery
<div id="container">
<div class="address">
<div class="input-reg rb-item input-group">
<span class="input-group-addon">Address </span>
<input type="text" class="form-control" placeholder="Insert text here">
</div>
<div align="center"><iframe class="map-img" width="100%" height="400" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.com/maps?hl=en&ie=UTF8&ll=37.0625,-95.677068&spn=56.506174,79.013672&t=m&z=4&output=embed"></iframe></div>
</div>
</div>
<div align="center" style="margin-top: 10px"><button id="btnAddAddress" class="btn btn-warning btn-md" type="button">Add Address</button></div>
的地址,这是我做过尝试,但没有工作
<script type="text/javascript">
$("#btnAddAddress").click(function() {
$("#container").append('<div class="address"><div class="input-reg rb-item input-group"><span class="input-group-addon">Address </span><input type="text" class="form-control" placeholder="Insert text here"></div><div align="center"><iframe class="map-img" width="100%" height="400" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.com/maps?hl=en&ie=UTF8&ll=37.0625,-95.677068&spn=56.506174,79.013672&t=m&z=4&output=embed"></iframe></div></div>');
});
</script>
你加载jQuery的?你会得到什么错误信息? – sideroxylon 2014-09-29 11:59:20
不工作意味着?它能做什么? – 2014-09-29 11:59:48
我没有得到错误消息我正在使用括号源代码编辑器 – user3667305 2014-09-29 11:59:49