| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 535 人关注过本帖
标题:早上到现在还搞不定的问题
只看楼主 加入收藏
haistar18
Rank: 1
等 级:新手上路
帖 子:8
专家分:0
注 册:2005-5-16
收藏
 问题点数:0 回复次数:3 
早上到现在还搞不定的问题

<html> <head> <title>产品订购网页</title> <meta http-equiv="Content-Type"content="text/html;charset=gb2312">

<SCRIPT language=javascript>

function notnumber(cstring) { var notnumbervar=false; var count=1; for(count=1;count<cstring.length;count++) { if(cstring.charAt(count)<"0"‖cstring.charAt(count)>"9") notnumbervar=true; } return notnumbervar

}

function datacheck() { var errflag=true; if(document.FCustomer.FName.value=="") { document.FCustomer.FName.focus(); alert("姓名不能为空!"); errflag=false;} else if(document.FCustomer.FTel.value=="") { document.FCustomer.FTel.focus(); alert("电话必须输入!") errflag=false; } else if (document.FCustomer.FEmail.value==""‖ document.FCustomer.FEmail.value.indexOf('@',0)==-1) { document.FCustomer.FEmail.focus(); alert("请输入正确的邮件地址!"); errflag=false; } else if (document.FCustomer.FAdress.value=="") { document.FCustomer.FAdress.focus(); alert("地址不能为空!"); errflag=false; } else if (document.FCustomer.FProduct.value=="") { document.FCustomer.FProduct.focus(); alert("请输入产品编号!"); errflag=false; } else if (document.FCustomer.FNumber.value==""‖ notnumber(document.FCustomer.FNumber.value)) { documert.FCustomer.FNumber.focus(); alert("必须输入有效的整数值!"); errflag=false; } return errflag; } </SCRIPT> 一运行老说我有错,我都不会改了,请高手帮帮忙!~

搜索更多相关主题的帖子: html javascript function content return 
2005-05-16 12:43
hxfly
Rank: 5Rank: 5
等 级:贵宾
威 望:17
帖 子:5810
专家分:118
注 册:2005-4-7
收藏
得分:0 
把错误信息帖出来

2005-05-16 12:46
haistar18
Rank: 1
等 级:新手上路
帖 子:8
专家分:0
注 册:2005-5-16
收藏
得分:0 
当前的脚本页发生错误 行:18 (在这里就是

<html> <head> <title>产品订购网页</title> <meta http-equiv="Content-Type"content="text/html;charset=gb2312">

<SCRIPT language=javascript>

function notnumber(cstring) { var notnumbervar=false; var count=1; for(count=1;count<cstring.length;count++) { if(cstring.charAt(count)<"0"‖cstring.charAt(count)>"9") notnumbervar=true; } return notnumbervar

}

这句 字符:29 错误:无效字符 代码:0 不知道为什么错了,一运行就出现这个. 这是一个填写表单的判断程序 谢谢
2005-05-16 19:33
盖茨他爹
Rank: 6Rank: 6
等 级:贵宾
威 望:28
帖 子:5255
专家分:0
注 册:2005-5-3
收藏
得分:0 
return notnumbervar这样试试
2005-05-16 19:52
快速回复:早上到现在还搞不定的问题
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.016236 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved