关于javascript:日常干货 jiezi 3 年前 去除前后空格 const trim = function(string) {return (string || '').replace(/^[\s\uFEFF]+|[\s\uFEFF]+$/g,''); };
去除前后空格 const trim = function(string) {return (string || '').replace(/^[\s\uFEFF]+|[\s\uFEFF]+$/g,''); };