比较简单实用的使用正则三种版本的js去空格处理方法

时间:2007-11-18    点击:118   
分别去字符串前后,左边,右边空格 
复制代码 代码如下:

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,"")} 
用js查找法实现当前栏目的高亮显示的代码
精解window.setTimeout()&window.setInterval()使用方式与参数传递问题!
document.designMode的功能与使用方法介绍
Flash+XML滚动新闻代码 无图片 附源码下载
window.open被浏览器拦截后的自定义提示效果代码
> 返回     
地址:上海市普陀区胶州路941号长久商务中心 电话: QQ:
© Copyright 2012 上海网络 Product All Rights Reserved