js表单验证代码全集(编辑修改稿)内容摘要:
return true。 } function isChinese(name) //中文值检测 { if( == 0) return false。 for(i = 0。 i。 i++) { if((i) 128) return true。 } return false。 } function isMail(name) // Email值检测 { if(! isEnglish(name)) return false。 i = ( at )。 j = name dot lastIndexOf( at )。 if(i == 1) return false。 if(i != j) return false。 if(i == name dot length) return false。 return true。 } function isNumber(name) //数值检测 { if( == 0) return false。 for(i = 0。 i。 i++) { if((i) 0 || (i) 9) return false。 } return true。 } function CheckForm() { if(! isMail()) { alert(您的电子邮件不合法。 )。 ()。 return false。 } if(! isEnglish()) { alert(英文名不合法。 )。 ()。 return false。 } if(! isChinese()) { alert(中文名不合法。 )。 ()。 return false。 } if(! isNumber()) { alert(邮政编码不合法。 )。 ()。 return false。 } return true。 } // /SCRIPT 限定表单项不能输入的字符 script language=javascript ! function contain(str,charset)// 字符串包含测试函数 { var i。 for(i=0。 i。 i++) if(((i))=0) return true。 return false。 } function CheckForm() { if ((contain(, %\(\))) || (contain(, %\(\)))) { alert(输入了非法字符 )。 ()。 return false。 } return true。 } // /script 1. 检查一段字符串是 否全由数字组成 script language=Javascript! function checkNum(str){return (/\D/)==null} alert(checkNum(1232142141)) alert(checkNum(123214214a1)) // /script 2. 怎么判断是否是字符 if (/[^\x00\xff]/(s)) alert(含有汉字 )。js表单验证代码全集(编辑修改稿)
相关推荐
用。 第十, ()等于多少。 ()等于多少。 ()返回( long) 12, ()返回( long) 11。 第十一, short s1 = 1。 s1 = s1 + 1。 有什么错。 short s1 = 1。 s1 += 1。 有什么错。 ( 面试题都是很变态的,要做好受虐的准备) short s1 = 1。 s1 = s1 + 1。 有错, s1 是 short 型, s1+1 是
集料的选择必须经过认真的料源调查,确定料源应尽可能就地取材。 质量符合使用要求 ,石料开采必须注意环境保护,防止破坏生态平衡。 集料粒径规格以方孔筛为准。 不同料源、品种、规格的集料不得混杂堆放。 道路石油沥青。 各个沥青等级的适用范围应符合表。 经建设单位同意,沥青的 PI值、 60℃动力粘度, 10℃延度可 作为选择性指标。 道路石油沥青的适用范围 表 沥青等级 适用范围 A级沥青
,但谁会 想到一夜之后同是这只鞍山一工又拉了涨停呢。 洗盘阶段 K 线图所显示的几点特征 : 大幅震荡 ,阴线阳线夹杂排列 ,市势不定。 成交量较无规则 ,但有递减趋势。 常常出现带上下影线的十字星。 股价一般维持在庄家持股成本的区域之上 .若投资者无法判断 ,可关注 10 日均线 ,非短线客则可关注 30 日均线。 按 K 线组合的理论分析 ,洗盘过程即整理过程 ,所
ctor. The JVM calls the finalizer for you as appropriate。 you never call a finalizer directly. Think of the finalizer as a friendly warning from the virtual machine. Your finalizer should perform two
n opposite way. The man relates to my descriptions of women and the woman relates to my descriptions of men. I call this role reversal. If you discover you are experiencing role reversal, I want to
al)设置秒 [注意 :此日期时间从 0开始计 ] 的表示方式 : [window.]frames[n].ObjFuncVarName,frames[frameName].ObjFuncVarName, 代表父亲对象 ,top 代表最顶端对象 :opener :this JS 函数时用 :(javascript:)来开头后面加函数名 JS:! // 49. 引 用 一 个 文 件 式 的 JS: