Trim   values in javascript

后端 未结 3 1390
情歌与酒
情歌与酒 2021-01-18 06:49

I am trying to trim the text which I get from kendo editor like this.

var html = \"  T  \"; // This sample text I get from Kendo editor
           


        
3条回答
  •  猫巷女王i
    2021-01-18 07:30

    If you are using jQuery you can use jQuery.trim()

    function removes all newlines, spaces (including non-breaking spaces), and tabs from the beginning and end of the supplied string. source

提交回复
热议问题