PassportFocus.initDocumentElementHTML = function() { PassportFocus.documentElement.innerHTML = '
'; PassportFocus.body = PassportFocus.documentElement.firstChild; PassportFocus.card = PassportFocus.body.nextSibling; }; // 重写,在首页登录时不出现正在登录的提示 PassportSC.drawPassportWait = function() { PassportFocus.body.innerHTML = "正在登录搜狐通行证,请稍侯..."; }; // 登录前 PassportSC._drawLoginForm= function() { PassportFocus.body.innerHTML = '\ 搜狐通行证\ \ '; }; function check_username(){ var user = document.getElementById('email').value; if(user == '用户名'){ document.getElementById('email').focus(); return false; } var pwd = document.getElementById('password').value; if(pwd == '123'){ document.getElementById('password').focus(); return false; } return true; } function hyz_auto_remove(obj){ if(obj.value == '用户名'){ obj.value= ''; } if(obj.value == '123'){ obj.value = ''; } } function hyz_auto_fill(obj){ if(obj.value == ''){ obj.value= '用户名'; } if(obj.value == ''){ obj.value = '123'; } } // 重写,因为不是标准卡片登录,输入框不是PassportSC.cElement PassportSC.drawLoginForm = function(){ this._drawLoginForm(); this.cElement.className = ""; var A = PassportFocus.documentElement.getElementsByTagName("input"); for (var i = 0; i < A.length; i++) { if (A[i].name == "email") { this.emailInput = A[i]; } if (A[i].name == "password") { this.passwdInput = A[i]; } if (A[i].name == "persistentcookie") { this.pcInput = A[i]; } } this.loginMsg = this.$getElementByClassName("error"); this.bindSelector(); this.autoFillUserId(); var _this = this; if (this.emailInput.value == "") { if (this.isSetFocus) { setTimeout(function(){ _this.emailInput.focus(); }, 50); } } else { if (this.isSetFocus) { setTimeout(function(){ _this.passwdInput.focus(); }, 50); } } }, // 登录后的横条 PassportFocus._drawPanelLogged = function() { var sHtml = '搜狐通行证 | ' + PassportFocus.login_name; sHtml += '\ \ '; sHtml += ''; PassportFocus.body.innerHTML = sHtml; }; PassportSC._drawPassportCard = function() { var E = '