源代碼
點擊運行
<!DOCTYPE html> <html manifest="demo_html.appcache"> <head> <meta charset="UTF-8"> <title>教程</title> </head> <body> <script src="demo_time.js"> </script> <p id="timePara"><button onclick="getDateTime()">獲取日期和時間</button></p> <p><img src="/images/logo.png" width="336" height="69"></p> <p>嘗試打開 <a href="tryhtml5_html_manifest.htm" target="_blank">這個頁面</a>, 在離線的狀態下重新載入這個頁面,頁面也可以訪問。</p> </body> </html>
運行結果