function input_onkeypress()
{
    //var eSrc = window.event.srcElement;
    if ( window.event.keyCode == 13)
    {
	login();
    }
	
}

function login()
{
 
  if(document.loginform.name.value.length<1)
  {
    alert("您必须输入用户的登录账号!");
    document.loginform.uid.select();
    return;
  }
  if(document.loginform.name.value.length>16)
  {
    alert("您输入用户名超长!");
    document.loginform.name.select();
    return;
  }
  if(document.loginform.name.value.indexOf("'")!=-1)
  {
    alert("您输入的用户账号含有非法字符(单引号)!");
    document.loginform.name.select();
    return;
  }
  if(document.loginform.name.value.indexOf("exec")!=-1)
  {
    alert("您输入的用户账号含有非法字符!");
    document.loginform.name.select();
    return;
  }
  if(document.loginform.name.value.indexOf("--")!=-1)
  {
    alert("您输入的用户账号含有非法字符!");
    document.loginform.name.select();
    return;
  }
  if(document.loginform.name.value.indexOf("//")!=-1)
  {
    alert("您输入的用户账号含有非法字符!");
    document.loginform.name.select();
    return;
  }
  if(document.loginform.name.value.indexOf("declare")!=-1)
  {
    alert("您输入的用户账号含有非法字符(单引号)!");
    document.loginform.name.select();
    return;
  }

  if(document.loginform.pwd.value.length<1)
  {
    alert("您必须输入用户的登录密码!");
    document.loginform.pwd.select();
    return;
  }
  if(document.loginform.pwd.value.indexOf("'")!=-1)
  {
    alert("您输入的用户登录密码含有非法字符(单引号)!");
    document.loginform.pwd.select();
    return;
  }
  if(document.loginform.pwd.value.indexOf("exec")!=-1)
  {
    alert("您输入的用户登录密码含有非法字符!!");
    document.loginform.pwd.select();
    return;
  }
  if(document.loginform.pwd.value.indexOf("//")!=-1)
  {
    alert("您输入的用户登录密码含有非法字符!");
    document.loginform.pwd.select();
    return;
  }
  if(document.loginform.pwd.value.indexOf("declare")!=-1)
  {
    alert("您输入的用户登录密码含有非法字符!");
    document.loginform.pwd.select();
    return;
  }

  loginform.action="verify.jsp";
  loginform.submit();
}

