嗨,我正在尝试找到一些 jQuery 代码来允许我在我的网站中插入多个页面。我想做两个div。在第一个中,我想显示网站(带有所有网站选项,例如更改链接等...),在另一个中,用户能够插入有关它和其他一些内容的注释...
这就是我正在做的事情:
<div id="div_top1" class="top">This is a paragraph.</div>
<div class="down"><button type="button" onclick="changediv()">Display Date</button></div>
<script>
function changediv()
{
document.getElementById("div_top1").innerHTML=Date();
document.getElementById("div_top1").setAttribute("id", "div_top2");
}
$("document").ready(function() {
$('#div_top2').load('helloworld.php');
});
</script>
我知道该功能正在更改为 div_top2,我只是不明白为什么它不加载页面