简单的,未做任何页面美化工作
将下列代码保存后,放在exchange所在服务器上即可。
测试环境win2k sp3+exchange server 2000
<html>
<head>
<title>OWA</title>
<script language="javascript">
<!--
var url="http://MailServer/exchange/"; //此处修改为所对应的OWA地址
//var url=location.href.substr(0,location.href.indexOf('/',8))+'/exchange/' ;
//var url="/exchange/";
var xmlhttp=false;
function geturl()
{
xmlhttp=false;
if (window.XMLHttpRequest)
{
xmlhttp = new XMLHttpRequest();
if(xmlhttp.overrideMimeType)
{
xmlhttp.overrideMimeType("text/html");
}
}
else if (window.ActiveXObject)
{
try
{
xmlhttp=new ActiveXObject("Msxml2.XMLHTTP");
}
catch(e)
{
try
{
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}
catch(e)
{
try
{
xmlhttp=new ActiveXObject("Msxml.XMLHTTP");
}
catch(e)
{
}
}
}
}
if (!xmlhttp)
{
alert("can't create xmlhttp instance");
return false;
}
if (document.login.name.value=="")
{
alert("用户名不能为空!");
document.login.name.focus();
return false;
}
if (document.login.pwd.value=="")
{
alert("密码不能为空!");
document.login.pwd.focus();
return false;
}
xmlhttp.open('GET',url,false,document.login.name.value,document.login.pwd.value);
xmlhttp.send(null);
if (xmlhttp.readyState == 4)
{
if (xmlhttp.status==200)
{
location.href=url;
return false;
}
else if (xmlhttp.status==401)
{
alert("用户、密码错误");
document.login.pwd.select();
return false;
}
else
{
alert("出现未知错误!");
document.login.name.select();
return false;
}
}
}
//-->
</script>
</head>
<body>
<form name=login action="" method="post" οnsubmit="return geturl();">
用户名:<input type=text name="name" value="">
<br />
密 码:<input type=password name="pwd" value="">
<br />
<input type=submit value="go">
</form>
</body>
</html>