함수 addValue(newValue) { if (CapsLockValue==) { var str=Calc.password.value; if(str .length{ Calc.password.value = newValue; } if(str.length{ password.value =Calc.password.value; } } else { var str=Calc.password.value; if(str.length{ //Calc.password.value = newValue.toUpperCase(); Calc.password.value = newValue; } if(str.length{ password.value=Calc.password.value; } } }
function setpassvalue() { var longnum=Calc.password .value.length; var num num=Calc.password.value.substr(,longnum-); Calc.password.value=num; var str=Calc.password.value ; password.value=Calc.password.value; }
함수 OverInput() { var str=Calc.password.value; password.value =Calc.password.value; closekeyboard(); Calc.password.value=""; password.readOnly=; }
기능 closekeyboard(theForm) { softkeyboard.style.display="none"; if(null!=unhideSelect){ unhideSelect(); } }
function showkeyboard() { randomNumberButton(); var th = password; var ttop = th.offsetTop; var thei = th.clientHeight; var tleft = th.offsetLeft; var ttyp = th.type; 동안(th = th.offsetParent){ttop =th.offsetTop; tleft =th.offsetLeft;} softkeyboard.style.top = ttop thei ; softkeyboard.style.left = tleft-; softkeyboard.style.display="block"; password.readOnly=; password.blur(); document.all.useKey.focus(); if(null!=hideSelect){ hideSelect(); } }
함수 setCapsLock() { if (CapsLockValue==) { CapsLockValue= } else { CapsLockValue= } } 함수 setCalcborder() { CalcTable.style.border="px solid #BADF" } 함수 setHead () { CalcTable.cells[].style.BackgroundColor="#BADF" } 함수 setCalcButtonBg() { for(var i=;i{ if(Calc.elements[i].type=="button"&&Calc.elements[i].bgtype!="") { if (Calc.elements[i].bgtype==""){ Calc.elements[i].className="btn_num"; }else{ Calc.elements[i].className="btn_letter"; } var str=Calc.elements[i].value; str=str.trim(); if(str.length==) { } var thisButtonValue=Calc.elements[i].value; thisButtonValue=thisButtonValue.trim(); if(thisButtonValue.length==) { Calc.elements[i].onclick= function () { var thisButtonValue=this.value; thisButtonValue=thisButtonValue.trim(); thisButtonValue=jiamiMimaKey(thisButtonValue); addValue(thisButtonValue); } Calc.elements[i].ondblclick= 함수 () { var thisButtonValue=this.value; thisButtonValue=thisButtonValue.trim(); thisButtonValue=jiamiMimaKey(thisButtonValue); addValue(thisButtonValue); } } } } } function initCalc() { setCalcborder(); setHead(); setCalcButtonBg(); } String.prototype.trim = function() { return this.replace(/(^s*)|(s*$)/g, ""); } var capsLockFlag; capsLockFlag=true; 함수 capsLockText() { if(capsLockFlag) { for(var i=;i{ var char =Calc.elements[i].값; var char=char.trim() if(Calc.elements[i].type=="button"&&char>="a"&&char { Calc.elements[i].value=" " String.fromCharCode(char.charCodeAt()-) " " } } } else { for(var i=;i{ var char=Calc.elements[i].value; var char=char.trim() if(Calc.elements[i].type=="button"&&char>="A"&&char { Calc.elements[i].value=" " String.fromCharCode(char.charCodeAt() ) " " } } } capsLockFlag=!capsLockFlag; }