复制代码 代码如下:
function getcrossdomaincontent() {
$.getscript(http://two.xthost.info/im0417/cnblogs.txt, function() { if (typeof (msg) != undefined) { $(#testcrossdomain).val(msg[0]); }
});
官方解释
jquery.getscript(url, [callback])
参数1:url,string类型。待载入 js 文件地址。
参数2:callback (可选),function类型。成功载入后回调函数。
复制代码 代码如下:
详细参考:http://www.jb51.net/shouce/jquery/jquery_api/ajax/$.getscript.html
