元标记中的JavaScript在Firefox和Internet Explorer上不起作用
javascript in meta tag not working on firefox and internet explorer
我注意到了这一点:
<meta HTTP-EQUIV="REFRESH" CONTENT="0;URL=javascript:alert(2)">
仅适用于 chrome,所以我的问题是,如何在元标记中执行 JavaScript,该元标记适用于 chrome、Firefox 和 Internet Explorer?就我的测试而言,这仅适用于chrome,而不适用于Internet Explorer和Firefox。
javascript:
URI,通过 MSFA 2009-22 /CVE-2009-1312 在 Firefox 中禁用。我想IE浏览器出于同样的原因禁用了此类URI。
因此,不能使用 javascript:
URI 进行元刷新。当然,您仍然可以自由地执行以下操作:
<script>
setTimeout(function() { alert(2); }, 0);
// or just
alert(2);
</script>
相关文章:
- 视频HTML没有'无法在Internet Explorer 11上工作
- Internet Explorer缺少占位符支持,特别是密码字段
- Internet Explorer中的文本换行错误
- 为什么我在Internet Explorer上看不到html元素
- internet explorer 8兼容模式下的Youtube api错误
- 当浏览器控制台未打开时,为什么要求会导致Internet Explorer 9超时
- Internet Explorer 8. Events
- jQuery表单验证适用于Mozilla和Internet Explorer,但不适用于Chrome或Safari
- element.dataset in Internet Explorer
- Facebook FB.init”;访问被拒绝”;在Internet Explorer 11中
- JavaScript不适用于internet explorer和Firefox,但适用于谷歌
- 在Internet Explorer中,向所选内容添加选项不起作用
- 在Internet Explorer中从二进制文件打开PDF
- elementproblem internet explorer
- 我可以使用哪些方法在Internet Explorer中禁用Alt+*X*
- 如何在Internet Explorer中使用javascript设置cookie
- 只有当alert()在带有AJAX的internet explorer中使用时,Javascript才会更新UI
- sharepoint站点的internet explorer中出现Javascript错误
- Internet Explorer重新加载IFrame
- 如何在不使用Internet Explorer的情况下从未挂起的HTML文件执行程序