JS去掉空格回车换行(转http://hi.baidu.com/niubore/blog/item/27c77b89ca1dead8fd1f102a.html)
来源:互联网 发布:域名和空间怎么绑定 编辑:程序博客网 时间:2024/05/21 10:48
http://hi.baidu.com/niubore/blog/item/27c77b89ca1dead8fd1f102a.html
Jquery:
$("#accuracy").val($("#accuracy").val().replace(// +/g,""));//去掉空格
$("#content").val($("#content").val().replace(/[ ]/g,"")); //去掉空格
$("#content").val($("#content").val().replace(/[/r/n]/g,""));//去掉回车换行
js:
var testStr="sssss
vvvvv";
var resultStr=testStr.replace(// +/g,"");//去掉空格
resultStr=testStr.replace(/[ ]/g,""); //去掉空格
resultStr=testStr.replace(/[/r/n]/g,""));//去掉回车换行
$("#accuracy").val($("#accuracy").val().replace(// +/g,""));//去掉空格
$("#content").val($("#content").val().replace(/[ ]/g,"")); //去掉空格
$("#content").val($("#content").val().replace(/[/r/n]/g,""));//去掉回车换行
js:
var testStr="sssss
vvvvv";
var resultStr=testStr.replace(// +/g,"");//去掉空格
resultStr=testStr.replace(/[ ]/g,""); //去掉空格
resultStr=testStr.replace(/[/r/n]/g,""));//去掉回车换行
- JS去掉空格回车换行(转http://hi.baidu.com/niubore/blog/item/27c77b89ca1dead8fd1f102a.html)
- 去掉滚动条(转帖地址:http://hi.baidu.com/xdvip/blog/item/118c485091c23f541038c299.html)
- 1.CheckBoxList js(http://hi.baidu.com/xuexiang516168/blog/item/bf772a324be85049ac4b5f3e.html)
- 【转 http://hi.baidu.com/yinaddress/blog/item/e21a7edce23d7a385982dda5.html】 (Oracle)rownum用法详解
- sqlite使用手册(转自:http://hi.baidu.com/zifengshen/blog/item/671240f7e148f428720eec32.html)
- 关于sqlite3的性能(转自:http://hi.baidu.com/snailzone/blog/item/da9368662bc94f25aa184c2b.html)
- BMP图像结构(转自:http://hi.baidu.com/zybabiao/blog/item/1357d5fb21c06567034f56ee.html)
- C#读取配置文件详解:转自(http://hi.baidu.com/huahua382811/blog/item/27d43cef3bd587f7b3fb956d.html)
- http://hi.baidu.com/heyg/blog/item/9ca8dcc4785706cb38db4937.html
- http://hi.baidu.com/suwey/blog/item/9b4d72c238e7e334e5dd3bc0.html
- http://hi.baidu.com/lhcling/blog/item/0e3e60cfa55aca3ef8dc61c0.html
- http://hi.baidu.com/jmugis/blog/item/ad03b11f89a25ef6e1fe0b18.html
- http://hi.baidu.com/nnffnn/blog/item/e84cd15c1d893943faf2c07c.html
- http://hi.baidu.com/herowzz/blog/item/286e3c546eb23157574e0077.html
- http://hi.baidu.com/kacaca/blog/item/1fd412d644f9f42907088b89.html
- http://hi.baidu.com/sophie198384/blog/item/26960501e9a757021d9583a0.html
- http://hi.baidu.com/123az/blog/item/f482f51980e8e04642a9ad6c.html
- http://hi.baidu.com/zonesky/blog/item/328d9807043c2ccb7a894717.html
- 电荷泵原理
- 用shell scripts 脚本完成 计算"您还有几天就过生日"
- JDBC事务的控制问题
- 2010 现在完成进行时...
- PuTTY Download Page - PuTTY 工具下载页
- JS去掉空格回车换行(转http://hi.baidu.com/niubore/blog/item/27c77b89ca1dead8fd1f102a.html)
- 我们都是好孩子!
- 设置一个JTable中某些单元格的背景色
- Wince的调试串口修改
- JS判断输入是否为整数的正则表达式
- bash command line editing
- GCC中的弱符号与强符号
- XmlHttpRequest对象使用实例
- Google checkout 自己写的,免费了啊!