我有一個背景裏面的按鈕:加載和消失
<div id="background">
<div id="button">button</div>
</div>
使用jQuery我加載其他頁面的DIV。
$(function(){
$("#button").click(function() {
$("#background").load("document.html #note");
});
})
加載的DIV比背景小得多,並且它被定位在中心:
#note{
position: absolute;
top: 150px;
left: 150px;
width:200px;
height: 200px;
line-height:200px;
background-color: #eee;
}
我可以加載它,但它被加載時該按鈕消失。爲什麼?
你撥弄不包括''
元素。如果你的按鈕被包含在'fons' div中,那就可以解釋它爲什麼會消失。 – Blazemonger