读书人

走走_js 去空格

发布时间: 2012-11-23 22:54:33 作者: rapoo

转转_js 去空格

 JavaScript 去除空格<SCRIPT LANGUAGE="JavaScript"><!--//出处:网上搜集//made by yaosansi 2005-12-02//For more visit http://www.yaosansi.com// Trim() , Ltrim() , RTrim() String.prototype.Trim = function() { return this.replace(/(^\s*)|(\s*$)/g, ""); }  String.prototype.LTrim = function() { return this.replace(/(^\s*)/g, ""); }  String.prototype.RTrim = function() { return this.replace(/(\s*$)/g, ""); }  //--></SCRIPT>

读书人网 >JavaScript

热点推荐