密码input输入框,如何智能输入数字?
2019-01-07 本文已影响39人
春木橙云
<input type="password" />如何只能输入数字呢?
答案:
<input type="password" onkeyup="value=value.replace(/[^\d]/g,'')" />
THE END
<input type="password" />如何只能输入数字呢?
答案:
<input type="password" onkeyup="value=value.replace(/[^\d]/g,'')" />
THE END