<script language="javaScript">
function checkGroupSend(){
obj=GroupSendForm.OtherPhone;
sOther = obj.value;
for (i=0;i<sOther.length;i++) {
c = sOther.charAt(i);
if (c!=String.fromCharCode(13) && c!=String.fromCharCode(10) && (c<'0' || c>'9')) {
window.alert("手机号码中含有非法字符[ " + c + " ]");
obj.focus();
return false;
}
}
}
</script> <form name="GroupSendForm" method="post" action="" onsubmit="return checkGroupSend();">
<textarea name="OtherPhone" rows="15"></textarea>
<input type="submit" name="Submit" value="提交">
</form>
function checkGroupSend(){
obj=GroupSendForm.OtherPhone;
sOther = obj.value;
for (i=0;i<sOther.length;i++) {
c = sOther.charAt(i);
if (c!=String.fromCharCode(13) && c!=String.fromCharCode(10) && (c<'0' || c>'9')) {
window.alert("手机号码中含有非法字符[ " + c + " ]");
obj.focus();
return false;
}
}
}
</script> <form name="GroupSendForm" method="post" action="" onsubmit="return checkGroupSend();">
<textarea name="OtherPhone" rows="15"></textarea>
<input type="submit" name="Submit" value="提交">
</form>
解决方案 »
- ExtJs的root.reload()问题
- 关于javascript中的拖放,疑惑!
- 怎么获得columntree点击的那个树节点的值啊?请各位帮帮忙
- 遍历文件 支持火狐
- 能否实现以列为单位来编写键盘输入响应的脚本
- 高分求 javascript 编写留痕编辑框 的经验?
- 我想向下拉列表添加一条数据,并选中它怎么做(马上接贴哈)
- 急!请高手帮忙。history.back()为什么不起作用?
- 有办法用javascript生成一个新的层并让这个层指向别的URL吗?
- JS中的 document.getElementById导致onchange整个函数不执行
- 请问如何获得数组的长度?
- 急问,为什么我用弹出窗口修改OPENER的窗口的文本框值一直报访问拒绝的错误?
高手与普通人区别,就在这里啊,我是只知其一,不知其二啊承蒙指教,感激的很