0
我用下面的代码到一个页面加载到另一个加载一个页面到另一个页面
<body>
<ul>
<li><a id="work" href="">Work</a></li>
<li><a id="profile" href="">Profile</a></li>
</ul>
<div id="container"></div>
<script>
$("#work").click(function(){
event.preventDefault();
$("#container").load("work.html");
}
$("#profile").click(function(){
event.preventDefault();
$("#container").load("profile.html");
}
</script>
</body>
在加载页面我要加载第3页,但相同的脚本不工作的第3页
work.html
<body>
<div id="container">
<button id="btn">Click Me</button>
</div>
<script>
$("#btn").click(function(){
event.preventDefault();
$("#container").load("thirdpage.html");
}
</scirpt>
</body>
你可以显示你尝试第三页的内容吗? –
第3页是什么意思? –
你在控制台遇到什么错误?顺便说一句,'' – j08691