This blog is my memo for collecting IT stuffs. And some my free softwares.Please use facebook to leave comments.

Do trim in Javascript

Last update 2009-06-22 23:25:46 (More than 1 year old)

Javascript doesn't have trim function. but you can use replace() function instead in a way something like this.

target = target.replace(/(^\s+)|(\s+$)/g, "");
Last update 2009-06-22 23:25:46

Comment Delicious

todo
facebook support
Page transaction
RSS feed
Search
Auth
Last update
Category
Multi-language
User
Open source
Environment
php-5.1.6 with PDO
SQLite-3.3
IE6
FireFox-1.5
RSS
Unauthorized

Search
Google