开发者

pulling in html (json string) into javascript

开发者 https://www.devze.com 2023-02-04 16:03 出处:网络
i am trying to pull an html page into my javascript file, (essentaiily the webpage will consist of a JSON string) and then i would like to set that string to a js var for eval.i have tried the $.ajax

i am trying to pull an html page into my javascript file, (essentaiily the webpage will consist of a JSON string) and then i would like to set that string to a js var for eval. i have tried the $.ajax method - 开发者_开发百科currently to no avail.


jQuery.getJSON('my.json', function (obj) {
    MyNS.Sub.doSomething(obj);
});
0

精彩评论

暂无评论...
验证码 换一张
取 消