Skip to content

Instantly share code, notes, and snippets.

@shabbirbhimani
Created October 21, 2019 14:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shabbirbhimani/78821cb4e8a234de9dd106918194b7b4 to your computer and use it in GitHub Desktop.
Save shabbirbhimani/78821cb4e8a234de9dd106918194b7b4 to your computer and use it in GitHub Desktop.
<script language="JavaScript">
<!--
function _submit_form(frm)
{
var email = frm.email.value;
var valid_email = /^([a-zA-Z0-9_.-])+@(([a-zA-Z0-9-])+.)+([a-zA-Z0-9]{2,4})+$/;
if( valid_email.test( email ) )
{
document.getElementById('before').style.display = 'none';
document.getElementById('after').style.display = 'block';
return true;
}
else
{
alert("Invalid email address");
}
return false;
}
//-->
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment