问一个正则表达式的问题,谢谢,100分,解决立马给分,来者散分

文本框中判断输入的内容,不能有~ !@ # $ % ^ & * ( ) < > / \ 空格等这些特殊字符,请问如何写写,大家帮忙呀,
---------------------------------------------------------------

只能是汉字:

1<input onkeyup="value=value.replace(/[^\u4E00-\u9FA5]/g,'')"/>

---------------------------------------------------------------

1<script language="javascript">   
2function String.prototype.isGoodWord(){return !/[^\u4E00-\u9FA5A-Za-z0-9._-]/g.test(this);}   
3  
4alert("ADh梅花jk452198.-".isGoodWord());   
5alert("ADh梅花jk45@&98.-".isGoodWord());   
6</script>
Published At
Categories with Web编程
comments powered by Disqus