JS Trim() 去空格
来源:互联网 发布:黑马p2p网络借贷平台 编辑:程序博客网 时间:2024/04/20 12:43
//出处:网上搜集
//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, "");
}
- JS Trim() 去空格
- IE下js实现trim()去空格
- js正则去前后空格,类似trim方法
- AS3 去空格函数 trim
- c++ trim 去字符串空格
- js trim去除左右空格
- js 去掉首尾空格 trim
- Java 去空格函数 trim 所在类
- javascript 字符串去空格(vb trim)
- php去空格,trim不行,str_replace行
- 给所有的input trim去空格
- 【TRIM】TRIM函数“去空格” 功能之外的洞天
- js去空格
- js去字符串空格
- JS 去空格函数
- js去空格方法
- JS去空格
- js去空格
- Android源码目录结构
- Citrix 虚拟化产品
- Json对象解析
- SNMP v1,v2,v3 的比较
- Java语法:数组
- JS Trim() 去空格
- JSTL下拉框默选象及一些公用的JS
- JS判断浏览器类型方法
- C专家编程——分析C语言的声明
- java操作Excel
- equals&hashCode的深入解析
- ubuntu初始化修改root密码
- struts中htmlselect标签和htmloptions 的使用
- 数据库