记录一下如何登陆AD认证的sharepoint站点,通过一个脚本可以实现。
<script type="text/javascript">
var xmlHttp;
var loginUrl;
function createXMLHttpRequest()
{
loginUrl ="http://moss.com/";
if(window.ActiveXObject) {
xmlHttp =new ActiveXObject("Microsoft.XMLHTTP");
}
else{
xmlHttp =new XMLHttpRequest();
}
}
function startRequest(UserID, Psw)
{
createXMLHttpRequest();
xmlHttp.onreadystatechange = handleStateChange;
xmlHttp.open("GET", loginUrl,true, UserID, Psw);
xmlHttp.send(null);
}
function handleStateChange()
{
if(xmlHttp.readyState == 4)
{
if(xmlHttp.status == 200)
{
window.location = loginUrl;
}
else{
alert("登录失败,请使用IE浏览器访问!");
}
}
}
</script>
<inputtype="submit"name="Submit"value="提交"onclick="javascript: startRequest(‘domain\\userid‘, ‘password‘);">
还需要把当前站点,添加为可信任站点。
sharepoint 2013 如何登陆AD认证的sharepoint站点,布布扣,bubuko.com
sharepoint 2013 如何登陆AD认证的sharepoint站点
原文地址:http://blog.csdn.net/chenxinxian/article/details/28634535