trim-截取两边空格

function trim(str) {
return str.replace(/^\s*(.*?)[\s\n]*$/g, '$1');
}

Popularity: -1%

No Responses to “trim-截取两边空格”

Leave a Reply:

Name (required):
Mail (will not be published) (required):
Website:
Comment (required):
XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>