//js post 方法
//作者:lmm
//日期:2010.03.02
//备注:通用ajax认证
function doSignOn(strUrl, rId, rPwd) {
var blnResult = false;
try {
var xmlHttpReq;
try {
if (window.XMLHttpRequest) {
xmlHttpReq = new XMLHttpRequest(); //firefox下执行此语句
}
else if (window.ActiveXObject) {
try {
xmlHttpReq = new ActiveXObject("Msxm12.XMLHTTP");
}
catch (e) {
try {
xmlHttpReq = new ActiveXObject("Microsoft.XMLHTTP");
} catch (e) { }
}
}
} catch (e) { }
xmlHttpReq.open("get", strUrl, false, rId, rPwd);
xmlHttpReq.send(null);
if (xmlHttpReq.readyState == 4 && xmlHttpReq.status == 200) {
blnResult = true;
window.location.href = strUrl;
}
}
catch (err) { }
return blnResult;
}