我有一个我正在使用的网站,在 FF4 中,位于页面主体内的 JS 不起作用。您可以在这里查看:http://www.1tryten.com/products/Laptop-Lock-Pro.html
头部中的任何 JS 都有效,但 body 中无效。您可以通过尝试将此商品添加到购物车或点击写评论来重现该问题。在 IE 或 Chrome 中尝试它,它可以工作...
它适用于所有其他浏览器。还有其他人遇到过这个问题吗?
最佳答案
语法错误:
Error: missing ) after argument list
Source File:http://www.1tryten.com/products/Laptop-Lock-Pro.html
Line: 933, Column: 50
Source Code:$('#subscribe_form').append("<input type="hidden" name="check" value="1" />"); // ---------------------------------------^
您可以通过查看控制台(工具 -> 错误控制台)轻松调试代码。
它认为它也不适用于 Chrome 或 IE。
我得到的另一个错误:
Error: uncaught exception: [Exception... "A parameter or an operation is not supported by the underlying object" code: "15" nsresult: "0x8053000f (NS_ERROR_DOM_INVALID_ACCESS_ERR)" location: "http://www.1tryten.com/javascript/common.js?1 Line: 779"]
关于javascript - <body> 中的 JS 在 FF 4 上不起作用?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6574746/