解决方案:用JS模拟IE用户登录,再跳转到对应的系统。
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<script type="text/javascript" language="javascript">
function Authen() {
var Location1 = "http://bi.xxx.com"; //定义你的路径
var auth = null;
if (window.XMLHttpRequest)
{
auth = new XMLHttpRequest();
} else if (window.ActiveXObject)
{
auth = new ActiveXObject("msxml2.xmlhttp"); //创建msxml2.xmlhttp对象
}
//var auth = new ActiveXObject("MSXML2.XMLHTTP.6.0"); //如需要,分浏览器判断创建对象
//var auth = new ActiveXObject("MSXML2.XMLHTTP.5.0");
auth.open("get", Location1, false, "用户名", "密码");
auth.send();
switch (auth.status) { //检测auth.send以后的状态,
case 200: //状态为:200代表用户名密码正确,
window.location.href = Location1; //浏览器重转向
break;
case 401: //状态为:401代表用户名密码不正确,身份验证错误
alert("用户无效或密码错误。"); //报错
break;
default: //其它状态,如服务器无法访问
alert(auth.status);
alert("对不起,服务器发生错误,请稍后再试!"); //报错
}
}
</script>
</head>
<body>
<input type="button" οnclick="Authen();" value="登 录"></input>
</body>
</html>