trim:去除两边空格 lTrim:去除左空格 rTrim: 去除右空格
<script language='javascript'>
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, "");
}
//使用时只需要调用一下就可以了。
function DropSpace(obj)
{
var v=obj.value.trim();
}
</script>
0
0
中译英5
中译英4
B5
BEC listen and translation exercise 37
BEC listen and translation exercise 36
中译英2
PyQt(Python+Qt)学习随笔:Designer中ItemViews类部件的frameShadow属性
第15.16节 PyQt(Python+Qt)入门学习:PyQt中的信号(signal)和槽(slot)机制以及Designer中的使用
PyQt(Python+Qt)学习随笔:Designer中ItemViews类部件frameShape属性
- 最新文章
-
scrapy框架中Spiders用法
scrapy框架中选择器的用法
scrapy框架的命令行解释
爬虫性能相关
PyQuery库的使用
beautifulsoup库的使用
正则的基本使用
【leetcode】924.Minimize Malware Spread
【leetcode】835. Image Overlap
【leetcode】922. Sort Array By Parity II
- 热门文章
-
【leetcode】921. Minimum Add to Make Parentheses Valid
【leetcode】915. Partition Array into Disjoint Intervals
【leetcode】679. 24 Game
【leetcode】482. License Key Formatting
【leetcode】757. Set Intersection Size At Least Two
【leetcode】421. Maximum XOR of Two Numbers in an Array
【leetcode】452. Minimum Number of Arrows to Burst Balloons
BEC listen and translation exercise 39
中译英7
BEC listen and translation exercise 38