- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
function echeck(str) {
var at="@"
var dot="."
var lat=str.indexOf(at)
var lstr=str.length
var ldot=str.indexOf(dot)
if (str.indexOf(at)==-1){
alert("please enter Email address");
return false
}
if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr){
alert("please enter a valid Email address");
return false
}
if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==lstr){
alert("please enter a valid Email address");
return false
}
if (str.indexOf(at,(lat+1))!=-1){
alert("please enter a valid Email address");
return false
}
if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot){
alert("please enter a valid Email address");
return false
}
if (str.indexOf(dot,(lat+2))==-1){
alert("please enter a valid Email address");
return false
}
if (str.indexOf(" ")!=-1){
alert("please enter a valid Email address");
return false
}
return true
}
fuckercoder 29.12.2017 05:17 # −1
COWuTEJIbTBOEuMAMKu 29.12.2017 05:18 # 0
vkasci 25.08.2021 19:37 # 0