js实现trim 效果

var trimLeft = "/^/s+/,";
   var trimRight = "//s+$/,";
   var fundCode = document.getElementById("fundCode").value.toString().replace( trimLeft, "" ).replace( trimRight, "" );
   

你可能感兴趣的:(js实现trim 效果)