输入banner图图片脚本导航/分类

JavaScript 去前后全脚半脚空格的正则

function trim(str)
{
return str.replace(/(^\s*)|(\s*$)/g, "");
}