标签:blog pre bsp ber alpha sch nbsp var prompt
<script type="text/javascript"> var c=prompt("请输入一个字符"); var isNumber = c>="0" && c<= "9"; var isAlphabet = (c>="A" && c<="Z")||(c>="a" && c<="z"); var isChinese = c>="\u4E00" && c<="\u9FA5"; console.log("您输入的是数字吗?"+ isNumber +"\n"+ "您输入的是字母吗?"+isAlphabet+"\n"+ "您输入的h汉字吗?"+isChinese); </script>
标签:blog pre bsp ber alpha sch nbsp var prompt
原文地址:http://www.cnblogs.com/AmbiguousMiao/p/7111819.html