如何將我的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