大写直接变小写 onblur="javascript:this.value=this.value.toLowerCase();" 键盘事件 onkeypress ="detectCapsLock(event,'capStatus');" function detectCapsLock(e,divid){ valueCapsLock = e.keyCode ? e.keyCode:e.which; // Caps Lock is on? valueShift = e.shiftKey ? e.shiftKey:((valueCapsLock == 16 ) ? true : false ); // shift is press? if (((valueCapsLock >= 65 && valueCapsLock <= 90 ) && ! valueShift) // Caps Lock is on and shift not press || ((valueCapsLock >= 97 && valueCapsLock <= 122 ) && valueShift)) // Caps Lock is on and shift is press document.getElementById(divid).style.display = 'block'; else document.getElementById(divid).style.display = 'none'; }
详细解决方案
JS登陆惯用效验
热度:173 发布时间:2013-07-11 15:38:46.0
相关解决方案