第一次提交
This commit is contained in:
53
tomcat/webapps/sm/script/login.js
Normal file
53
tomcat/webapps/sm/script/login.js
Normal file
@@ -0,0 +1,53 @@
|
||||
|
||||
function check(login, start)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (start)
|
||||
{
|
||||
login.yhm.select();
|
||||
login.yhm.focus();
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
var msg = $("msg");
|
||||
msg.innerHTML = " ";
|
||||
}
|
||||
if(login.yhm.value.length==0)
|
||||
{
|
||||
login.yhm.focus();
|
||||
}
|
||||
else if(login.mm.value.length==0)
|
||||
{
|
||||
login.mm.focus();
|
||||
}
|
||||
else
|
||||
{
|
||||
var argument = new Array("yhm", login.yhm.value, "mm", login.mm.value);
|
||||
postRequest("login.jsp", argument, successLogin, exception);
|
||||
}
|
||||
}
|
||||
catch(e)
|
||||
{
|
||||
alert("<22><><EFBFBD>д<EFBFBD><D0B4><EFBFBD><EFBFBD><EFBFBD>" + e.name + "<22><>" + e.message);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function successLogin(result)
|
||||
{
|
||||
finishProcess();
|
||||
document.location = result.getAttribute("redirect");
|
||||
}
|
||||
|
||||
function exception(info)
|
||||
{
|
||||
finishProcess();
|
||||
var errorMsgElement = $("msg");
|
||||
errorMsgElement.innerHTML = info;
|
||||
var login = document.forms[0];
|
||||
login.yhm.select();
|
||||
login.mm.select() ;
|
||||
login.mm.focus();
|
||||
}
|
||||
Reference in New Issue
Block a user