跨域脚本 [英] Cross Domain Scripting

查看:89
本文介绍了跨域脚本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以在JavaScript中执行跨域脚本。

基本上我需要从另一个应用程序访问应用程序的某些元素..是否可以使用JavaScript?

请帮助!

Is it possible to do Cross Domain Scripting in JavaScript.
Basically i need to access some elements of an application from another application ..Is it possible to do using JavaScript?
Please Help!

推荐答案

确实如此。您可以使用动态脚本标记,它允许代码形成远程站点,例如JSON,包括在内。


您也可以使用跨域代理,但这取决于服务器端代码。


For子域名,使用document.domain属性。
It is. You can use dynamic script tags which allow code form remote sites, e.g. JSON, to be included.

You can also use a cross-domain proxy, but that depends on server-side code.

For sub-domains, use the document.domain property.


@acoder


你能给出一些相关的例子或我可以教的任何链接我自己..

谢谢!
@acoder
Can you give some related examples or any link where i can teach myself ..
Thanks!


为了什么?所有技术还是一个特定的技术?
For what? All of the techniques or one particular one?


这篇关于跨域脚本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆