如何将我的php页面加载到单个div区块中?在我的index.php 比如我有在单个div中加载不同的php页面
<a>when i click this link it loads the home.php page on the div</a>
<a>when i click this link it loads the location.php page on the div</a>
<div id="content">
</div>
如何将我的php页面加载到单个div区块中?在我的index.php 比如我有在单个div中加载不同的php页面
<a>when i click this link it loads the home.php page on the div</a>
<a>when i click this link it loads the location.php page on the div</a>
<div id="content">
</div>
使用jQuery你可以使用.load和的.html功能加载相应的页面到内容DIV
您可以使用jQuery的load()
方法:
$('#content').load('home.php');
您可以使用它作为“网页内容的div”
上班的I帧<iframe src="http://www.stackoverflow.com"></iframe>
不建议w3schools.com。见http://w3fools.com为什么。 – 2013-02-13 16:09:47
看看jQuery和'.load()'函数,如果你想用AJAX做。 – 2013-02-13 16:05:12