什么是只允许数字和字母的键码js? [英] What is the keycode js to allow only number and letter?
本文介绍了什么是只允许数字和字母的键码js?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何阻止用户使用javascript输入特殊字符?提前谢谢
我的尝试:
how can i prevent user from typing special character using javascript? thanks in advance
What I have tried:
onkeydown = "return (!(event.keyCode>=65) && event.keyCode!=32);"
推荐答案
只允许数字和字母的键码js是什么?
这应该可以帮助您入门。
JavaScript事件密钥编码 [ ^ ]
"What is the keycode js to allow only number and letter?"
This should help you get started.
JavaScript Event KeyCodes[^]
这篇关于什么是只允许数字和字母的键码js?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文