2007-09-17
ajax 跨域访问
关键字: 跨域访问
应用中希望提供一个通用的JS,可以被 其他网站引用。
当用户打开引用这段代码页面时候,这段js访问 服务,取回数据,并在页面显示数据。
这里碰到了一个 ajax跨域访问的问题。
就是 比如引用这段js的网站是www.sina.com。 js要访问www.google.com 取得数据。
大家有没有碰到类似的。给个建议。
当用户打开引用这段代码页面时候,这段js访问 服务,取回数据,并在页面显示数据。
这里碰到了一个 ajax跨域访问的问题。
就是 比如引用这段js的网站是www.sina.com。 js要访问www.google.com 取得数据。
大家有没有碰到类似的。给个建议。
评论
afcn0
2007-09-18
有呀,跨域script tag看,看看yahoo服务就是这么弄的,XHR跨域,ie当中加入信任中可以,ff3.0正在搞信任header确认的XHR对象,是w3c新标准,还是script tag比较好用呀
jonson
2007-09-18
Have been implement by absolute js.the method is get js code from the server as this :<script type="" src="www.sina.com/xx.jsp"></script>.
in the jsp file.u can get the data and create the js code in the server side .and then run at the cient end.
by this way.i do the job i want.
and the more method which can resolve this method that can been argued here.
in the jsp file.u can get the data and create the js code in the server side .and then run at the cient end.
by this way.i do the job i want.
and the more method which can resolve this method that can been argued here.
campaign
2007-09-17
把www.google.com加入到可信任站点,我们的项目就是这么做得,但在ff下没有办法
letle
2007-09-17
可以通过做一个中间代理来解决ajax跨域的问题
yeaha
2007-09-17
提取数据移到服务器端做,ajax传给js处理
发表评论
提醒: 该博客已发表在公共论坛,博客所有留言会成为论坛回贴,留言请注意遵守论坛发贴规则
- 浏览: 2854 次
- 性别:

- 来自: 杭州

- 详细资料
搜索本博客
我的相册
大竹海04
共 2 张
共 2 张
最近加入圈子
最新评论
-
js 函数的定义、运行 顺 ...
niuyuewanzi 写道jonson 写道afcn0 写道大哥你不会指的是这 ...
-- by cyan19851224 -
题库贴
1。100的阶乘的程序: /* * To change this t ...
-- by jonson -
题库贴
3.SELECT PCLASS, PSCORE from (select PCL ...
-- by firefox_1983 -
题库贴
难道大家都是超级高手!!都不需要练手?还是觉得题目太简单!其实在工作之余 做做小 ...
-- by jonson -
丑陋的继承
jonson 写道bluemeteor 写道AbstractTopicPO |_ ...
-- by 抛出异常的爱






评论排行榜