前者是在chrome报错
后者是在Firefox报错
错误根源:<input type="button" value="close" onclick="msgbox(0," ")">
因为" "中包含 "" 改成 ' ' 就可以啦
上图中的 sunday.id 中 sunday是对象, sunday.name
通过alert(...) 或者 console.log(...) 就可以看到
本文介绍了如何解决HTML中按钮点击事件在Chrome和Firefox浏览器中出现的不同错误。问题源于按钮的onclick属性设置不当,通过调整字符串引用的方式得以解决。
前者是在chrome报错
后者是在Firefox报错
错误根源:<input type="button" value="close" onclick="msgbox(0," ")">
因为" "中包含 "" 改成 ' ' 就可以啦
上图中的 sunday.id 中 sunday是对象, sunday.name
通过alert(...) 或者 console.log(...) 就可以看到

被折叠的 条评论
为什么被折叠?