我想执行一个远程javascript,将用户重定向到我域中的另一个页面,并将数据作为查询字符串传递。我想获取传递到我的域上的页面的这些数据。.getScript获取javascript的重定向url
$.getScript('http://site.com/foo.js', function() {
//foo.js redirects to another page on my domain with data
// and i d like to capture that data from this function,
// at least if i find the parameters that passed on there, i ll be fine.
});
怎么办?
http://api.jquery.com/jQuery.getScript/
你能澄清一下这个重定向是怎么发生的吗? foo.js是否包含一个改变window.location.href的脚本? 当你说“作为查询字符串传递的数据”时,什么是s? – Ryan 2010-05-09 05:18:35
foo.js重定向到我的页面:mypage.aspx?a = 1&b = 2等等。 – DarthVader 2010-05-09 05:28:38
你被重定向了吗?你需要什么?改变重定向的查询字符串? – GerManson 2010-05-09 08:00:48