jQuery切换在IE8、9、10中包含错误 [英] Jquery toggle Includes error in IE8,9,10
本文介绍了jQuery切换在IE8、9、10中包含错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用jquery切换代码来获取if条件的选项.但无法正常工作.任何人都可以发现此问题. 我在IE中遇到此错误.对象不支持属性或方法包含"
I am using jquery toggle code to get option for if condition. but not working.anyone find this issue. I am getting this error in IE.Object doesn't support property or method 'includes'
JS:
$("#dates").toggle(["Single", "Multi"].includes(filterType));
if (filterType === "") {
} else if (!parseInt(filterType)) { } else{}
推荐答案
您需要将polyfill添加到您的代码中. 您可以在文档中找到它
You need to add the polyfill to your code. You can find it in the documentation
https://developer.mozilla .org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Array/includes
这篇关于jQuery切换在IE8、9、10中包含错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文