Javascript打破了Firefox

时间:2010-06-05 23:48:10

标签: javascript firefox

我正在研究这个在Safari和Chome中运行良好的Javascript脚本,但由于某些原因它在Firefox中根本不起作用。我确定了造成这种情况的那条线:它是“休息”。

我该如何解决这个问题?

1 个答案:

答案 0 :(得分:1)

Nick说什么(删除休息)!如果您试图阻止事件冒泡,请尝试:

e.stopPropagation(); // this will stop any other parent handlers from firing
e.stopImmediatePropagation(); // this will stop any other handlers (including on the current object from firing.
e.preventDefault(); // this will stop the browser from handling the event.
相关问题