JS认证Exchange

 function ExchangeLogin() {
vstrServer='<%=LocationUrl %>'
vstrDomain = '<%=userLogin.AD %>'
vstrUsername = document.getElementById("<%=UserNameTxt.ClientID%>").value;
vstrPassword = document.getElementById("<%=PassWordTxt.ClientID%>").value;
if (vstrUsername == "" || vstrPassword == "")
{ alert("用户名密码不能为空!"); return; }
var strUrl = "https://" + vstrServer + "/owa/auth/owaauth.dll";
var strExchange = { destination: 'https://' + vstrServer + '/owa',
flags: '0', forcedownlevel: '0',
trusted: '0', isutf8: '1', username: vstrUsername, password: vstrPassword
}; var myForm = document.createElement("form");
myForm.method = "post";
myForm.action = strUrl; for (var varElement in strExchange) { var myInput = document.createElement("input");
myInput.setAttribute("name", varElement);
myInput.setAttribute("value", strExchange[varElement]);
myForm.appendChild(myInput);
} document.body.appendChild(myForm);
myForm.submit();
document.body.removeChild(myForm);
}

  

上一篇:完美解决Informix的中文乱码问题


下一篇:ThinkPHP5 API 文档