<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>ajax2</title>
<script src="js/jquery-1.11.3.js"></script>
</head>
<body>
<script>
$.ajax({
// url貌似不能是本地的绝对路径。此处是相对路径。
// 估计可以是http://...(网络路径)。
url: "./data/bimYiYuanRvt/scenetree.json",
dataType: 'json',
data: { x: new Date() },
success: function(scenetree) {
console.log("scenetree:", scenetree);
}
});
$.getJSON(self.path + "周边交通.json", function (data){});
</script>
</body>
</html>
jquery ajax请求本地json文件.html
最新推荐文章于 2025-03-20 11:07:47 发布