2023-08-07T10:48:15.png

var k =  "                哇哇哇哇哇哇哇哇哇哇啊啊啊啊啊啊啊啊哇哇哇哇哇哇哇哇哇哇哇            ";

//去除前后两端空格
var kg = k.trim();

console.log(kg);









//去除首尾换行符,回车符,制表符

var q = "\r\n的点点滴滴的点点滴滴\t\r";

var qq = q.trim();

console.log(qq);








//去除首部空格
var s = k.trimStart();
console.log(s);

//去除尾部空格
var w = k.trimEnd();
console.log(w);