Tue Sep 13, 2011 11:03 pm
<html>
<title>email validation</title>
<script language="JavaScript" type="text/javascript">
// Validate Email .
function validateEmail(email){
var reg = /^([A-Za-z0-9_-.])+@([A-Za-z0-9_-.])+.([A-Za-z]{2,4})$/;
if (reg.test(email)) {
document.getElementById("errorDiv").innerHTML = "This email is valid.";
}else{
document.getElementById("errorDiv").innerHTML = "This email is not valid.";
}
}
</script>
<table>
<tr><td>
<input type="text" id="email" name="email" />
<input type="button" onclick="validateEmail(email.value);" value="check Email" /><br/>
<div id="errorDiv"/>
</td>
</tr>
</table>
</html>
Codemiles.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com
Powered by phpBB © phpBB Group.