您的位置:首页 > 其它

exchange 自定义邮箱登陆界面

2008-08-05 14:44 1091 查看
<script type="text/javascript">
function plogin_onclick() {
var Location="http://mail.*****/exchange/"; //你的Exchange默认登录地址( 填入你自己的域名)
var serpath=http://mail.*****/; //当输入错误时,返回的地址。
var uname=document.getElementById("user").value;
var upwd=document.getElementById("pwd").value;

if (document.getElementById("user").value==""){
alert("帐号不能为空!");
document.getElementById("user").focus();
return false;
}
if (document.getElementById("pwd").value==""){
alert("密码不能为空!");
document.getElementById("pwd").focus();
return false;
}

var auth = new ActiveXObject("msxml2.xmlhttp");
auth.open("get",Location,false,document.getElementById("user").value ,document.getElementById("pwd").value );
auth.send();

switch(auth.status){
case 200:
form1.action=Location;
form1.submit;

break;
case 401:
alert("帐号无效或密码错误。");
form1.action=serpath;
form1.submit;
break;
default:
alert("服务器发生错误,请稍后再试!");
}
}
</script>
</head>
<body topmargin="0" onload="document.forms[0].user.focus();">
<form id="form1" action="" onsubmit="return plogin_onclick()">

<div align="center">
<table width="863" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="100"> </td>
<td> </td>
</tr>
<tr>
<td width="585" height="433"><img src="images/mail_left.jpg" width="585" height="433" /></td>
<td><table width="279" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="279" height="152"><img src="images/mail_top.jpg" width="279" height="152" /></td>
</tr>
<tr>
<td width="279" height="30" background="images/mail_user.jpg">
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="62"></td>
<td width="217" align="left">
<input id="user" type="text" maxlength="20" style="width:90px;" /></td>
</tr>
</table>

</td>
</tr>
<tr>
<td width="279" height="34" background="images/mail_pwd.jpg">

<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="62"></td>
<td width="217" align="left">
<input id="pwd" type="password" maxlength="20" style="width:90px;" /></td>
</tr>
</table>

</td>
</tr>
<tr>
<td width="279" height="217" background="images/mail_login.jpg" valign="top">

<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="279" height="20" align="center"> </td>
</tr>
<tr>
<td height="197" valign="top">

<input type="image" src="images/mail_btn.jpg" width="86" height="33" />

</table>

</td>
</tr>
</table></td>
</tr>
</table>

</div>
</form>
</body>
</html>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: