Step 1
Add the following code to your head:<script language="javascript" type="text/javascript"> function removeSpaces(string) { return string.split(' ').join(''); } </script>
Step 2
Use the following code for your text field:
<form>
<input type="text" onblur="this.value=removeSpaces(this.value);">
<input type="button" value="Click">
</form>
<input type="text" onblur="this.value=removeSpaces(this.value);">
<input type="button" value="Click">
</form>
0 comments:
Post a Comment