<script language=Javascript> //自己动手为string添加Trim
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, "");}
var str = " meizz ";
alert(str.Trim());
alert(str.Ltrim());
alert(str.Rtrim());
</script>
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, "");}
var str = " meizz ";
alert(str.Trim());
alert(str.Ltrim());
alert(str.Rtrim());
</script>
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货