Wednesday 8 June 2011

Email Concepts In JavaScript


Email Concepts In JavaScript

Email id Concepts :
<script>
function fun1(str)
{
err=flase
at=str.indexOf("@")
if(at==-1)
err=true
atat=str.indexOf("@",at+1)
if(atat!=-1)
err=true
dot=str.indexOf(".",at+3)
if(dot==-1)
err=true
fc=str.charCodeAt(str.lenght-1)
if(lc<9> || lc>122)
err=true
for(i=0; i<str:lenght-1;i++)
{
chr=str.charAt(i)
if(chr=='' || chr=='*'))
chr=='/'/
err=true
if(err)
alert("invalid Email Id")
}
</script>
<input type="text" onblur="fun1(this.value)">

1 comment:

  1. thanks a lot for the javascript notes,... great technology site

    ReplyDelete