<script>
function jsTrim(){
var str=strText.value
str = str.replace(/^\s*/g,"")
str = str.replace(/\s*$/g,"")
strText.value=str
}
</script>
<input id=strText value=" abd "><input type=button value=去掉字符串前后空格 onclick=jsTrim()>
function jsTrim(){
var str=strText.value
str = str.replace(/^\s*/g,"")
str = str.replace(/\s*$/g,"")
strText.value=str
}
</script>
<input id=strText value=" abd "><input type=button value=去掉字符串前后空格 onclick=jsTrim()>
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货