var DisIDStr = 'FS400_User_Login'; var FS400_UserPath = '/User'; var Login_DisType = 'transverse'; var Login_TypeStr = '0'; function User_Login_Check(loginobj) { var CheckStr = ''; var Fs_FocusStr = ''; var Namestr = $('Name').value; var PassStr = $('password').value; if (Namestr == '') { CheckStr = '用户名 不能为空'; Fs_FocusStr = $('Name'); } else { if (PassStr == '') { CheckStr = CheckStr + '\n密 码 不能为空'; Fs_FocusStr = $('password'); } else { CheckStr = ''; Fs_FocusStr = ''; } } if (CheckStr != '') { CheckStr = '提示:\n' + CheckStr; alert(CheckStr); Fs_FocusStr.focus(); return false; } else { return true; } } function Request(action) { var LoginUrl = FS400_UserPath+'/m_UserLogin.asp'; var myAjax = new Ajax.Request( LoginUrl, {method:'get', parameters:action, onComplete:Login_Receive } ); } function Login_Receive(XmlObj) { if (XmlObj.responseText.indexOf("$$$")>-1) { check=XmlObj.responseText.split("$$$"); switch (check[0]) { case "Err" : alert(check[1]); break; default : alert(check[1]); } } else { $(DisIDStr).innerHTML=XmlObj.responseText; } } function User_Check_State() { var action = 'Act=CheckState&DisTF='+Login_TypeStr+'&DisType='+Login_DisType+'&spanid='+DisIDStr; Request(action); } User_Check_State();