简体   繁体   English

JS可以在Safari中使用,但不能在IE9中使用-有人可以帮助实现此功能吗?

[英]JS works in Safari but not IE9 - Can anyone help to make this work?

The script I am using can be found at this example 在此示例中可以找到我正在使用的脚本

It works in Safari, but not IE9. 它适用于Safari,但不适用于IE9。

Any ideas on how to make it work? 关于如何使其运作的任何想法?

event.target.value where's the event variable coming from? event.target.value event变量来自哪里? Maybe you forgot to specify the parameter? 也许您忘记了指定参数?

Try: 尝试:

document.getElementById('filter').onchange = function (event) {
    document.getElementById('field').value = event.target.value  
}
document.getElementById('filter').onchange = function (event) {
    document.getElementById('field').value = event.target.value  
}

Have you enabled JS in IE9? 您是否在IE9中启用了JS?

If not, then do this in IE9: 1. Click on the "Tools" icon. 如果不是,则在IE9中执行以下操作:1.单击“工具”图标。 (Tools icon is on the top right-hand corner of IE9, or Tools can also be found on the Menu bar as "Tools"). (“工具”图标位于IE9的右上角,或者也可以在菜单栏上找到“工具”作为“工具”)。 2. Then click -> Internet Options" -> Security tab -> Custom Level button -> Scroll to the "Scripting" section near the bottom, and under "Active scripting" select Enable. 3. Click OK. 2.然后单击-> Internet选项”->安全选项卡->自定义级别按钮->滚动到底部附近的“脚本”部分,然后在“活动脚本”下选择“启用”。3.单击“确定”。

Now just close down IE9 completely, and restart a new instance of IE9 for javascript to get enabled and start working. 现在,只需完全关闭IE9,然后重新启动IE9的新实例即可启用javascript并开始工作。

Regards, Reno Jones 问候,里诺·琼斯

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 JS代码使IE9和Safari冻结,在Opera中不起作用? - JS code makes IE9 and Safari freezing and does not work in Opera? JS函数在FF和Safari中效果很好,但在IE9中花费很长时间 - JS function works great in FF and Safari, but takes a VERY long time in IE9 用于检测浏览器宽度和高度的 JS 适用于 Chrome 和 Safari,但不适用于 IE9 或 FF9 - JS to detect browser width and height works in Chrome & Safari but not IE9 or FF9 在Firefox和IE9中无法获取数据,但在Chrome和Safari中可以正常工作 - Can't get data in Firefox and IE9 but it works fine in Chrome and Safari 淘汰赛JS脚本可在Chrome中使用,但不能在IE9中使用 - Knockout JS Script works in Chrome but not in IE9 任何人都可以帮助初学者了解为什么这个简单的 JS 不起作用? - Can anyone help a beginner as to why this simple JS wont work? 为什么JS功能在IE9中无法正常工作? 但在Chrome和Firefox中可以正常工作 - Why JS function does not work properly in IE9? but works fine in Chrome and Firefox 在ie9中进行插值三次三次运算 - Make interpolation bicubic work in ie9 如何使我的文件下载在IE和safari上正常工作? - How can I make my file download work on IE and safari? JS可以在IE,Safari,Chrome中运行,但不能在Firefox中运行? - JS works in IE, Safari, Chrome but not in Firefox?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM