【发布时间】:2013-07-08 08:13:20
【问题描述】:
我有一个 html 页面 (comp.html),其中 div“内容”和一些浮动元素,在我的 div 下我有一个链接。将此链接(#addphoto)推送到我的 div 后,应插入来自另一个页面的 div(来自 box.html 的#photo_content)。我该怎么做?
html:
<div class="content clearfix">
<div class="photo">1</div>
<div class="photo">2</div>
<div class="photo">3</div>
<div class="photo">4</div>
</div>
<a href="#" id="addphoto"></a>
它的css:
.content{
width: 600px;
}
.photo{
float:left;
width:150px;
}
请兄弟们帮忙,我的jquery和Ajax真的很差
【问题讨论】:
-
不完全清楚应该发生什么,您尝试了什么以及为什么不起作用。
-
我应该将 second.html 中的 div 插入到 first.html 的 div class="content clearfix"
-
second.html 里面有什么?你尝试过 Ajax 吗?
-
在第二个 html - box.html: section id="photo_content" 里面有很多重复的类,比如第一页 class="photo"