Jump to content
Sign in to follow this  

Verifica email

Recommended Posts


Boa noite pessoal, tenho aqui um exercicio que tenho que fazer para a escola de javascript, que é verificar se numa textbox o email que o utilizador insere é valido, isto é, se tem o @ e o ponto, eu para o @ já consegui fazer mas agora para o ponto não consigo, será que me podem ajudar ? :D

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<script language="javascript">
function validaform(){
var a, conta_caracteres, i;
for(i=0; i<conta_caracteres; i++){
if(a.substr(i, 1)=="@"){
	alert("Tem aqui o arroba");
return true;

<h1>Verifica Email</h1>
<form id="form1" name="form1" method="post" onsubmit="return validaform(this);">
Email:<input type="text" name="email" />
<input type="submit" value="Verificar" />

Obrigado :D

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Create New...

Important Information

By using this site you accept our Terms of Use and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.