Morpheusweb.it - Risorse per webmaster: script, ASP.NET, C#, Visual Basic .Net, tutorial, asp, javascript, css, php, html, java, ADO, VBScript, forms, frames, Active Server Pages, Dynamic HTML, database, gratis per webmaster e webdesigner

Verifica

Script per la verifica dei campi di una form per l'invio di e-mail.


<%
Function CheckMail(strMail)
  if len(strMail)>6 then
    pos = Instr(1,strMail, "@")
    if pos >= len(strMail)-3 then
      Exit Function
    end if
    if pos < 2 then
      Exit Function
    end if
    dotpos = Instr(pos+1 ,strMail, ".")
    if dotpos > len(strMail)-2 then
      Exit Function
    end if
    if len( Mid(strMail, pos+1) ) < 5 or dotpos = 0 then
      Exit Function
    end if
    CheckMail = True
  else
    CheckMail = False
  end if
End function

blnMail = CBool(checkMail("morph@morpheusweb"))
if blnMail = True then
  Response.write "<p>E-mail valida"
else
  Response.write "<p>E-mail non valida"
end if
%>



Scarica il Codice...


Stampa la pagina


 








Inizio pagina

risorse per webmaster