摘要:
HTML用户名:<input type="text" id="UserAccount" onKeyPress="JumpByEnter(UserPwd)" />密码:<input name="UserPwd" type="password" onKeyPress="IsEnterKeyPress()">JavaScript:JumpByEnter(UserPwd) 函数功能:输入完用户名按回车,焦点转向密码输入框IsEnterKeyPress()功能: 阅读全文
摘要:
1.文本框只能输入数字代码(小数点也不能输入)<input onkeyup="this.value=this.value.replace(/\D/g,'')" onafterpaste="this.value=this.value.replace(/\D/g,'')">2.只能输入数字,能输小数点.<input onkeyup="if(isNaN(value))execCommand('undo')" onafterpaste="if(isNaN(value) 阅读全文