摘要:
//去字符两边的空格String.prototype.trim = function () { var matches = this.match(/^[\s]+/); var prefixLength = (matches == null) ? 0 : matches[0].length; matches = this.match(/[\s]+$/); var suffixLength = (matches == null) ? 0 : matches[0].length; return this.slice(prefixLength, this.length - suffixLength); 阅读全文
posted @ 2012-02-16 11:54
王清清
阅读(429)
评论(6)
推荐(0)
浙公网安备 33010602011771号