且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

***实践:合法的跨站点脚本

更新时间:2023-01-08 15:54:17

你有三个选择:


  1. 创建服务器端代理脚本

  2. 创建远程脚本以读入远程动态HTML。使用像 jQuery 这样的库来简化这一过程。您可以使用加载功能在需要时注入HTML。 编辑我最初的意思是#2使用 JSONP ,这要求服务器端脚本识别callback =? param。

  1. Create a server side proxy script.
  2. Create a remote script to read in remote dynamic HTML. Use a library like jQuery to make this easier. You can use the load function to inject HTML where needed. EDIT What I originally meant for example # 2 was utilizing JSONP, which requires the server side script to recognize the "callback=?" param.

使用客户端Flash代理并设置 crossdomain.xml 服务器的Web根目录上的a>文件。