My code:
<html>
<head>
<title></title>
<script type="text/javascript">
function valor() {
var form1 = document.frm;
var dados = form1.dados.value;
if (dados == "teste"){
alert('pegando dados');
form1.dados.focus();
return false;
}
return true;
}
</script>
</head>
<body>
<form onSubmit="return valor()" name="frm" method="post"
action="http://schemas.xmlsoap.org/soap/envelope/">
<input name="dados" placeholder="email">
<input type="submit" onClick="return valor()" value='Inserir texto'/>
</form>
</body>
</html>