请问如何判断文本框内是数字还是字母等等啊 <input id="ys"><button onclick='alert(isNaN(ys.value)?"Not A Number":"Number")'>check</button> 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 <script>function charTypeAtTest(str){ alert (isNaN(str)?"非数字":"数字") var charType="" for(var i=0;i<str.length;i++) { ch=str.substring(i,i+1) execScript("c=(ASC('"+ch+"'))","vbscript"); if (c<0) charType+="中文 " if (c<58 && c>48) charType+="数字 " if (c<123 && c>96) charType+="小写字母 " if (c<91 && c>64) charType+="大写字母 " } return (charType)}</script><input type=text><input type=button onclick="alert ('包含:'+'\n'+charTypeAtTest(txt1.value))"> <script>function charTypeAtTest(str){ alert (isNaN(str)?"非数字":"数字") var charType="" for(var i=0;i<str.length;i++) { ch=str.substring(i,i+1) execScript("c=(ASC('"+ch+"'))","vbscript"); if (c<0) charType+="中文 " if (c<58 && c>48) charType+="数字 " if (c<123 && c>96) charType+="小写字母 " if (c<91 && c>64) charType+="大写字母 " } return (charType)}</script><input type=text><input type=button onclick="alert ('包含:'+'\n'+charTypeAtTest(txt1.value))"> javascript 数组中的小问题 extjs 监听事件问题 AJAX提交,jquery效果问题 JS如何取到RadioButtonList所选中的值呢? 如果让这段JS代码兼容Firefox呢? 请朋友们帮忙扒个JS,谢谢 新手问题,高分相送 如何用js实现局部放大图象?可以实现吗? 关于一段程序的几句难点(在此谢过了啊!) 菜鸟问题:jquery无法设置checkbox选中 一个正则表达式的问题,急!!!! 如何设置下列列表的宽度
function charTypeAtTest(str){
alert (isNaN(str)?"非数字":"数字")
var charType=""
for(var i=0;i<str.length;i++) {
ch=str.substring(i,i+1)
execScript("c=(ASC('"+ch+"'))","vbscript");
if (c<0) charType+="中文 "
if (c<58 && c>48) charType+="数字 "
if (c<123 && c>96) charType+="小写字母 "
if (c<91 && c>64) charType+="大写字母 "
}
return (charType)
}
</script>
<input type=text>
<input type=button onclick="alert ('包含:'+'\n'+charTypeAtTest(txt1.value))">
function charTypeAtTest(str){
alert (isNaN(str)?"非数字":"数字")
var charType=""
for(var i=0;i<str.length;i++) {
ch=str.substring(i,i+1)
execScript("c=(ASC('"+ch+"'))","vbscript");
if (c<0) charType+="中文 "
if (c<58 && c>48) charType+="数字 "
if (c<123 && c>96) charType+="小写字母 "
if (c<91 && c>64) charType+="大写字母 "
}
return (charType)
}
</script>
<input type=text>
<input type=button onclick="alert ('包含:'+'\n'+charTypeAtTest(txt1.value))">