0 0

Prototype 同源问题10

请问Prototype的同源问题?
帮助文件上的例子是
var url = '/proxy?url=' + encodeURIComponent('http://www.google.com/search?q=Prototype');
// 注意:使用 proxy 是为了避开 SOP(参见:SOP)
new Ajax.Request(url, {
method: 'get',
onSuccess: function(transport) {
var notice = $('notice');
if (transport.responseText.match(/href="http:\/\/prototypejs.org/))
notice.update('Yeah! You are in the Top 10!').setStyle({ background: '#dfd' });
else
notice.update('Damn! You are beyond #10...').setStyle({ background: '#fdd' });
}
}
);

请教一下proxy的说法,是不是在后台根据传入的参数进行跳转来解决这个问题?
2011年3月16日 19:34
目前还没有答案

相关推荐

Global site tag (gtag.js) - Google Analytics