解决办法(方法名 is not defined): dosave=function(){ alert("方法名在前");} 下面这种写法有时候会出现错误: function dosave(){ alert("方法名在后");}