<html>
<head>
<script>
function f(obj){
//字符替换
obj.value=obj.value.replace("'","");
//...可复制,实现禁止输入各种字符
}
</script>
</head>
<body>
<input type="text" id="txt" onkeyup="f(this);" onkeydown="f(this);" onkeypress="f(this);"/>
</body>
</html>
文本框禁止输入特殊字符
禁用特定字符输入的文本框
最新推荐文章于 2023-07-30 17:00:37 发布
1167

被折叠的 条评论
为什么被折叠?



