1. 如在 AAA.js 文件中声明一个json对象。
var world_geo_json = {"type":"FeatureCollection","offset":{"x":170,"y":90},"features":[ ] };
2. 调用。
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,height=device-height">
<title>标题</title>
<style>::-webkit-scrollbar{display:none;}html,body{overflow:hidden;height:100%;}
</style>
<script type="text/javascript" src="./AAA.js"></script>
<body>
<div id="mountNode"></div>
<script type="text/javascript">
//获取AAA.js 中的json。
var Data = world_geo_json;
console,log("_Data", Data);
</script>
</body>
</html>