jQuery事件在Firefox中运行,而不是Chrome [英] jQuery events work in Firefox, not Chrome
问题描述
JavaScript的目的是显示正确的
这里是代码:
http://www.savetherobots.org/users/jkost/substitutioncipher.php
根据 Firebug ,脚本没有bug。代码有问题吗?
Hai,
选择框,您需要为更改事件而不是点击事件注册处理程序。 Firefox和IE使用click事件很奇怪。
看看这个 和
jQuery Click事件没有在Safari中被触发?
I registered some click events in my code. They function properly in Firefox (Windows and Mac) but don't execute in Chrome (tried Windows and Mac beta).
The purpose of the JavaScript is to show the correct number of text inputs based on the value of the select element.
Here is the code: http://www.savetherobots.org/users/jkost/substitutioncipher.php
The script is bug-free according to Firebug. Is something wrong with the code?
Hai ,
For Select boxes, you need to register a handler for a "change" event rather than a "click" event. It's strange that Firefox and IE work with the click event.
Have a look at this Click event on select option element in chrome
and JQuery Click event not being triggered in Safari?
这篇关于jQuery事件在Firefox中运行,而不是Chrome的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!