Javascript to remove spaces from a textbox value

后端 未结 7 1397
一生所求
一生所求 2020-12-17 00:44

I\'ve searched around for this a lot and can\'t find a specific example of what I\'m trying to do. Basically I want to get the value of a textbox, by the name of the text bo

7条回答
  •  渐次进展
    2020-12-17 01:13

    Here is a function I use to replace spaces.

    function removeSpaces(val) {
       return val.split(' ').join('');
    }
    

提交回复
热议问题