gpt4 book ai didi

javascript - 禁用 JS 的 IE10 执行手动输入 `onmousedown`

转载 作者:塔克拉玛干 更新时间:2023-11-02 21:18:56 26 4
gpt4 key购买 nike

在 IE10 中,我通过设置最高安全级别禁用了 JS 执行(IE11 也受到影响)。

然后我在任何站点的任何元素上添加或编辑 onmousedown 属性(例如,www.google.com 上的 body 元素) .

<body onmousedown="alert('Hello')">...</body>

所以我在点击任何地方时都会收到提醒。

这是预期的行为还是错误?

最佳答案

F12 在 IE10 中有自己的禁用菜单:

This menu helps you test how users would experience your site based on how they have configured their browser. The following commands are available in the Disable menu:

Script

Disable all scripts on a webpage. This command must be clicked again to enable all scripts. When selected, the command is set and causes the page to refresh. This command is not available if Internet Security has Protected Mode set to On. To activate this command, set Protected Mode to Off.

Popup Blocker

Disable all pop-up blockers so that pop-ups are allowed on this website. This command must be selected again to enable pop-up blockers. This command is not available if Internet Security has Protected Mode set to On. To activate this command, set Protected Mode to Off.

All CSS

Disable all Cascading Style Sheets (CSS) on the page. Click again to enable all CSS. When selected, the command is set and causes the page to refresh to reflect the selection. This command will be re-enabled when a webpage refreshes.

这在 IE11 中已弃用:

There are no plans at this time to bring back the disable menu from IE10 F12. You can disable most of the features previously in the F12 disable menu from the Internet Options advanced and security options.

引用资料

关于javascript - 禁用 JS 的 IE10 执行手动输入 `onmousedown`,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17269665/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com