Thursday, June 10, 2010

AlphaNumberandslash Validator using JavaScript

//for AlphaNumberandslash
function alphaNumberslash(evt) {
evt = (evt) ? evt : window.event
var charCode = (evt.which) ? evt.which : evt.keyCode
//alert(charCode)
if((charCode > 30 & charCode < 47)|charCode==32 |(charCode > 57 & charCode < 65) |(charCode > 90 & charCode < 97)|(charCode > 122 & charCode < 127) ){
status = "This field accepts AlphaNumberic and slash."
return false
}
status = ""
return true
}

No comments:

Post a Comment