Is there possible/easy solution to remove spaces from the beginning/ending of the input field
For example, let assume * is space and user entered "***Word*", so how can I check and save the word without the spaces ?
In javaScript you can do this.
var str = " Hello World! ";
alert(str.trim());
try to use trim
Hope this helps.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.