我有一些沒有jQuery頁面,每個頁眉和頁腳。我如何使它成爲單個頁眉和頁腳。 (即)要在主頁面頁眉/頁腳部分加載頁眉/頁腳html文件。jquery手機標頭/腳註
請指教。
請看以下頁面結構....
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Single page template</title>
<link rel="stylesheet" href="css/jquery.mobile-1.2.0.min.css" />
<script src="js/jquery-1.8.2.min.js"></script>
<script src="js/customScript.js"></script>
<script src="js/jquery.mobile-1.2.0.min.js"></script>
</head>
<body>
<div data-role="page" id="page1">
<div id="hdr">
<!--Need to include header.html-->
</div>
<div data-role="content">
<!--Content-->
</div>
<div id="ftr">
<!--Need to include footer.html-->
</div>
</div>
</body>
</html>
在此先感謝....
首先,你應該有JQM腳本和''
樣式表的鏈接。 – Omar我在帶有** header.php **文件和另一個** footer.php **的jQuery移動設備的移動設備上使用** php **。然後我用'<?php include'inc/header.php'給他們打電話。 ?>在每個需要的文件上。 – kevin
PHP將如何在移動設備上工作...?你可以提供一些代碼... – Yesvinkumar