Firefox中出现错误 missing ( before formal parameters
function String.prototype.Trim()
{
return this.replace(/^\\s*/g,"").replace(/\s*\$/g,"");
}
错误行显示在这个函数上,是不是这种写法Firefox不支持?
------解决方案--------------------
这样就好了。
JScript codeString.prototype.Trim = function() { return this.replace(/^\s*|\s*$/g,"");}alert("[" + " 123 ".Trim() + "]")
查询谷 - www.chaxungu.com
Firefox中出现异常 missing ( before formal parameters
编辑:chaxungu时间:2022-10-02 23:17:04分类:web开发