//
validate email
function IsMail(mail)
... {
var patrn = /^w+([-+.]w+)*@w+([-.]w+)*.w+([-.]w+)*$/;
return patrn.test(mail);
}
// validate url
function IsURL(url)
... {
var regexp = /^http://[A-Za-z0-9]+.[A-Za-z0-9]+[/=?%-&_~`@[]':+!]*([^<>""])*$/;
return regexp.test(url);
}
function IsMail(mail)
... {
var patrn = /^w+([-+.]w+)*@w+([-.]w+)*.w+([-.]w+)*$/;
return patrn.test(mail);
}
// validate url
function IsURL(url)
... {
var regexp = /^http://[A-Za-z0-9]+.[A-Za-z0-9]+[/=?%-&_~`@[]':+!]*([^<>""])*$/;
return regexp.test(url);
}