找判断不允许输入字母的提交代码。 正则表达式呀:http://www.993063.com/article/skill/044/411496541.htmhttp://msdn.microsoft.com/library/chs/default.asp?url=/library/CHS/jscript7/html/jsreconintroductiontoregularexpressions.asp 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 <html><head><meta http-equiv="Content-Type" content="text/html; charset=gb2312"><title>无标题文档</title></head><body><form name="form1" method="post" action="" onSubmit="return check(document.form1.textfield.value);"> <input type="text" name="textfield"> <input type="submit" name="Submit" value="提交"></form> <SCRIPT LANGUAGE="JavaScript">function check(inputStr){ iLength = inputStr.length for (i = 0; i < iLength; i++){ var aaa=inputStr.charCodeAt(i); if ((64< aaa)&& (aaa< 123 )){ alert("Input error!"); return false ; } } return true ;}</SCRIPT></body></html> svg和jsp jQuery的simpleTree树的问题 我点一张图怎么换成另一张图 在JavaScript中使用StringBuilder 为什么不是数字的相加而是字符串的联接? Help me again please 路过的也进来看看!!! 如何通过document.all返回得到一张HTML页面中所有的Table对象(没有定义ID和name)? JS里绝对值的函数是什么? 求证EasyUI的执行效率 根据值提交两个不同的页面 js 如何匹配一空白串(包括零长度串)/数值型小数/数值型整数/含正负数的----------正则表达式
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
</head>
<body>
<form name="form1" method="post" action="" onSubmit="return check(document.form1.textfield.value);">
<input type="text" name="textfield">
<input type="submit" name="Submit" value="提交">
</form>
<SCRIPT LANGUAGE="JavaScript">
function check(inputStr){
iLength = inputStr.length
for (i = 0; i < iLength; i++){
var aaa=inputStr.charCodeAt(i);
if ((64< aaa)&& (aaa< 123 )){
alert("Input error!");
return false ;
}
}
return true ;
}
</SCRIPT></body>
</html>