繁体   English   中英

Jquery click() function 在 Internet Explorer 中不起作用

[英]Jquery click() function doesn't work in Internet Explorer

我有一个脚本,它使用 CSV 从输入中删除项目。 它在资源管理器中除外

http://jsfiddle.net/BXWqK/21/

可能是什么原因? 我想不通……!

我想你说的是旧版本的 Internet Explorer(新版本是 9,你的脚本可以在上面运行)。

然后可能是因为Array.indexOf ,Internet Explorer 以前没有那个 function。 请参阅Internet Explorer 中的 Array.indexOf

顺便说一句, jQuery.inArray还返回数组中值的索引。 所以这样做是非常多余的:

if ($.inArray(fruit_remove, fruits_array) > -1) {
   var fruit_index = fruits_array.indexOf(fruit_remove);
   ...

暂无
暂无

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM