function Ltrim(str)
{//去除字符串左空格字符
var p=/^\s*/g
str=str.replace(p,"");
form1.ftopic.value=str
}function Rtrim(str)
{//去除字符串右空格字符
var p=/\s*$/g
str=str.replace(p,"");
form1.ftopic.value=str
}
{//去除字符串左空格字符
var p=/^\s*/g
str=str.replace(p,"");
form1.ftopic.value=str
}function Rtrim(str)
{//去除字符串右空格字符
var p=/\s*$/g
str=str.replace(p,"");
form1.ftopic.value=str
}
{
return this.replace(/(^\s+)|\s+$/g,"")
}
var str=" sf "
alert(str.trim())
String.prototype.trim = function() {
return (this.replace(/^\s+|\s+$/g,""));
}
alert(" cloudchen ".trim().bold())
</SCRIPT>