"温馨提示,咨询1小时3分20秒后关闭".replace(/\d*秒/, "") "温馨提示,咨询1小时3分后关闭" .replace(regexp, replaceValue) 转载于:https://www.cnblogs.com/zno2/p/5112772.html