HTML通過jQuery引入模板
- 完整報錯

- 新創建一個chrome快捷方式,命名為chrome-debug

- 右鍵屬性,在目標后添加參數,原始路徑如下
"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe"
- 添加參數后如下
"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --user-data-dir="c:\ChromeDebug" --test-type --disable-web-security
-
再打開頁面,發現可以導入其他HTML文件了
-
HTML代碼
<html lang="en">
<head>
<meta charset="UTF-8">
<title>test</title>
<script src="js/jquery.min.js"></script>
</head>
<body>
world
<div class="top"></div>
<script>
$(function(){
$(".top").load("test.html");
});
</script>
</body>
</html>
- 不容易啊

