javascript欧洲杯买球下注盘口 建设银行登陆键盘_javascript技巧_脚本之家

复制代码
代码如下:/******************************************************
//*功能描述:把密码输入控件写入页面中 //*参数说明:
//inputCtlName:原控件名 // //创建日期:2006-07-24
******************************************************/
varInputControlAreaIndex=0; varInputControlAreaPubKey=”;
varInputControlAreaAccVer=”115A7165-DE06-49B8-9850-15414C233E83:1009″;
varInputControlAreaFlag=”1″; varInputControlAreaAccVerFlag=false;
varInputControlAreaArray=newArray(); functionInputControlArea{
//初始化控件标签 varinput=document.all[inputName]; //初始化软键盘
//this.initKeyBoard; //判断控件是否启用
if(input==null||arguments.length!=2||(InputControlAreaFlag!=2&&InputControlAreaFlag!=3)){
this.obj=false; return; } //生成控件标签
this.init(“Sec.”+inputName,inputName); //取得有效控件
varreturnObject=this.getInputCtl(document.all[“Sec.”+inputName],type);
//显示有效控件
this.obj=this.displayInput(returnObject,document.all[inputName]);
InputControlAreaArray[InputControlAreaArray.length]=this.obj; }
InputControlArea.prototype.initKeyBoard=function{
if(InputControlAreaFlag==3||InputControlAreaFlag==1) {
input.onkeydown=function(){ Calc.password.value=this.value; }
input.onchange=function(){ Calc.password.value=this.value; }
input.onclick=function(){ password1=this; showkeyboard();
this.readOnly=1; Calc.password.value=”; }
}elseif(InputControlAreaFlag==2||InputControlAreaFlag==0) {
input.onkeydown=null; input.onchange=null; input.onclick=null; } }
InputControlArea.prototype.init=function{
//在函数末尾追加的控件,先调用。 functionwriteInputControl{
//生成控件标签 varclass; if { class+clsid+”‘”; } inputSpan+=’

‘+’

‘; } varinputSpan=document.all[inputName].outerHTML+””;
writeInputControl; // varstrCtls=InputControlAreaAccVer.split;
for(vari=0;i’; inputSpan+=””;
document.all[inputName].outerHTML=inputSpan; }
InputControlArea.prototype.displayInput=function{ //控件有效
if(returnObj.classid!=””) { input.style.display=”none”;
returnObj.style.display=””;
document.all[returnObj.id+”img”].style.display=””;
document.all[input.name+”Area”].style.display=”inline”;
returnObj.onblur=function(){ //判断离开焦点时的处理是否存在 if {
input.onblur.call(); } //设置密码
//input.value=returnObj.GetPassword(InputControlAreaPubKey);
//returnObj.length=returnObj.GetLength(); }
returnObj.onDoSubmit=function(){
input.value=returnObj.GetPassword(InputControlAreaPubKey);
returnObj.length=returnObj.GetLength(); } if(InputControlAreaPubKey==”)
{ initOnSubmit();
InputControlAreaPubKey=returnObj.GetPubKey(InputControlAreaPubKey); }
returnObj.SetFunName; }else{ //控件无效 input.style.display=””;
returnObj=false; if((window.location.toString==-1) { return; }
varwarning; if(InputControlAreaAccVerFlag) {
warning=”您的密码输入控件版本无效,是否安装新版本?”; } else {
warning=”您未安装密码输入控件,是否安装?”; }
varSetUpFlag=this.GetCookie; varreturnFlg=this.GetCookie; if {
this.SetCookie; return; } if(SetUpFlag!=”0″||SetUpFlag==null) {
this.SetCookie;
top.location=”/app/B2CMainPlatV5?CCB_IBSVersion=V5&CUSTYPE=0&TXCODE=801002″;
} } //返回有效控件 returnreturnObj; }
InputControlArea.prototype.getInputCtl=function{ varvalidSE=0;
for(vari=inputCtls.length-1;i>=1;i–){ try{
if(InputControlAreaAccVer.indexOf(inputCtls[i].GetVersion{
InputControlAreaAccVerFlag=true; continue; }
inputCtls[i].SetCryptFlag; validSE=i; break; }catch{ //continue; }
try{ inputCtls[i].GetStrMsg(); validSE=i; break; }catch{ continue; } }
InputControlAreaIndex=validSE; returninputCtls[validSE]; }
functioncallOnBlurByName{
document.all[“Sec.”+inputCtlName][InputControlAreaIndex].onblur.call();
} InputControlArea.prototype.SetCookie=function {
document.cookie=sName+”=”+escape+”;expires=Fri,31Dec299923:59:59GMT;”; }
//Retrievethevalueofthecookiewiththespecifiedname.
InputControlArea.prototype.GetCookie=functionGetCookie {
//cookiesareseparatedbysemicolons varaCookie=document.cookie.split;
for(vari=0;i

相关文章