可完成标题中目标的手段可以有多种,如用link或iframe,或者用jquery框架,现以iframet为例介绍:
1、不用任何js框架,如jquery方式实现:
var body=document.getElementById("sp_logout");
var a = document.createElement("iframe");
a.src="http://192.168.6.220:7888/idp/BackgroundSLOServlet";//另一系统的url
body.appendChild(a);
a.οnlοad=function()
{
window.location.href=url;//等iframe加载完成后,再执行
}
2、利用jquery完成
$.ajax({
url: idpURL,
type: 'get',
dataType: 'jsonp'
}).complete(function(){
window.location.href = APS.PageContext.urls.logout;
});
}