Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试将一个 html 页面拉入我的 javascript 文件中(基本上该网页将包含一个 JSON 字符串),然后我想将该字符串设置为用于 eval 的 js var。我已经尝试过 $.ajax 方法 - 目前无济于事。
jQuery.getJSON('my.json', function (obj) { MyNS.Sub.doSomething(obj); });