你是要jsp的,还是要javascript的呀
解决方案 »
- easyui datagrid某列绑定下拉列表
- jQuery:在页面加载完毕之后,怎么在head里加title、meta
- select如何不显示滚动条?
- 有没有一个jQuery插件,可以调用Windows Media Player?
- 还是JavaScript函数的问题,,高手们来挑战吧!
- 如何让鼠标移到text上面显示以下表格内容(连表格一块显示)?
- 如何打开一个无关闭按钮的叶面?
- 我form中一select中的option被选中,在提交后,如何用javascript来保存选中的那个option
- 请教一个谷歌浏览器兼容性问题。在线等。
- 双逻辑非操作符问题
- 有关session问题
- 急问!!!!!!!!!!!!!!
dim names,name, i, c
'Check for valid syntax in an email address.
IsValidEmail = true
names = Split(email, "@")
if UBound(names) <> 1 then
IsValidEmail = false
exit function
end if
for each name in names
if Len(name) <= 0 then
IsValidEmail = false
exit function
end if
for i = 1 to Len(name)
c = Lcase(Mid(name, i, 1))
if InStr("abcdefghijklmnopqrstuvwxyz_-.", c) <= 0 and not IsNumeric(c) then
IsValidEmail = false
exit function
end if
next
if Left(name, 1) = "." or Right(name, 1) = "." then
IsValidEmail = false
exit function
end if
next
if InStr(names(1), ".") <= 0 then
IsValidEmail = false
exit function
end if
i = Len(names(1)) - InStrRev(names(1), ".")
if i <> 2 and i <> 3 then
IsValidEmail = false
exit function
end if
if InStr(email, "..") > 0 then
IsValidEmail = false
end if
end function
var str = "[email protected]";
if(str.indexOf('@') == -1)
alert("必须含有@");2,
var str = "222";
if(/^\d{0,6}$/.test(str))
alert("success");
else
alert("fail");