去除JS中前后空格函数
function Trim(str)
{
var str2;
if (str == null)
{
str = "";
} else {
str2 = str.toString().replace(/(^\s*)|(\s*$)/g, "");
}
return str2;
}