Javascript Replace Reserved Special Characters in Form Field

User Rating:  / 0
PoorBest 

Need to remove special reserved characters in form fields? Here you go - setup your field like this:

 onBlur="var val = form.CurrentMonth.value; if (val) form.CurrentMonth.value=val.replace(/\$|,|@|#|~|`|\%|\*|\^|\&|\(|\)|\+|\=|\[|\-|\_|\]|\[|\}|\{|\;|\:|\'|\<|\>|\?|\||\\|\!|\$|\./g,'')
"