Home > Article > Web Front-end > JS-like trim method written by myself_javascript skills
Since the trim method of JS is not supported in many browsers, here we can use the trim method written by ourselves to deal with the need to cut off the empty strings at both ends of the string. There are many processing methods. I only choose one here. Tested by yourself