June 13, 2009

Disabled certain key to be entered using javascript

There is always the good way to prevent and verify the using enter data, especially for each text box or text area. The following is script use the event object to check on the key code that the user enter, return false to prevent user to enter. Disabled space to…

Trim a string in Javascript

Trim is a good features when you try to delete the space at the left most, right most or both the left most and right most of the string. The following trim function is ultilize the javascript Regular expression for the trim function Left Trim function ltrim(str){     return str.replace(/^s+/, ”);…, pub-3772983857049267, DIRECT, f08c47fec0942fa0