string.prototype.trim = function()
{
return this.replace(/(^[\s]*)|([\s]*$)/g, );
}
以上的这个方法是通过正则表达式来去除文本内容的空格
2026公务员·事业单位培训课程试听报名