how to validate email in textbox??
if email id like m//@gmail.com or
m--@gmail.com not bale to validate it??
how to do that. plz suggest
function checkEmail() {
// alert("email");
var email = document.getElementById('txtEmail');
var filter = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
if (!filter.test(email.value)) {
alert('Please provide a valid email address');
email.focus;
return false;
}
above function is not working