JavaScript 去前后全脚半脚空格的正则


function trim(str)
{
return str.replace(/(^\s*)|(\s*$)/g, "");
}
« 
» 
快速导航

Copyright © 2016 phpStudy | 豫ICP备2021030365号-3