在我的网站中,我使用 externalInterface 在我的 javascript 代码和我的 flash 游戏之间进行通信。
这在 IE 10 上运行良好,但在 IE 11 上不起作用。
示例代码:
if (ie) {
console.log('sending the graphs data');
console.log("result_graph_object: " + document.getElementById("result_graph_object"));
console.log("is function: " + (typeof document.getElementById("result_graph_object").setGraphPath == 'function'));
window.document.getElementById("result_graph_object").setGraphPath(handpath);
}
IE10 中的控制台输出:
sending the graphs data
result_graph_object: [object HTMLObjectElement]
is function: true
IE11 中的控制台输出:
sending the graphs data
result_graph_object: [object HTMLObjectElement]
is function: false
出于某种原因,IE11 无法识别 flash 对象方法(在 IE11 上为“is function: false”)。
有人知道为什么会这样吗? 谢谢
最佳答案
这可能与谁有关,
IE 11 可以像谷歌浏览器一样使用 Flash 嵌入元素, 而不是像以前的 IE 版本那样使用 flash 对象元素...
这就是我的问题的解决方案
关于javascript - externalInterface javascript 在 Internet Explorer 11 中不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20994078/