Find and Replace Regular expression in Javascript :
var trimreg = /(?:^\s+|\s+$)/; // To remove leading and trailing spaces
docs.sname.value = docs.sname.value.replace(trimreg,''); //sname is the html tag name of one text field
docs.mobile.value = docs.mobile.value.replace(trimreg,''); //mobile is the html tag name of one text field
Wednesday, August 20, 2008
at
6:14 AM
Labels: Javascript
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment