“杀”是什么意思? 用 JavaScript 做什么?

发布于 2024-07-13 05:56:12 字数 190 浏览 4 评论 0原文

这个 JavaScript 到底做了什么?

parent.kill = 1;

我正在开发的一个项目中使用它来进行某种会话过期,但我以前从未见过它。 它加载在 iframe 中,因此我假设它的目标是 DOM document.window

What does this JavaScript do exactly?

parent.kill = 1;

This is used in a project I'm working on to do some sort of session expiration but I've never seen it before. It's loaded in an iframe so I'm assuming that it is targeting the DOM document.window.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

行至春深 2024-07-20 05:56:12

子 iframe 正在 parent window 的全局范围内设置变量 kill。 仅从那行 javascript 无法确定 parent 对该变量执行的操作。

The child iframe is setting the variable kill in the parent window's global scope. What the parent does with that variable cannot be determined from just that line of javascript.

黑寡妇 2024-07-20 05:56:12

为了借鉴@crescentfresh的答案,这里是保留关键字的列表。

to piggy-back off @crescentfresh's answer, here is a list of reserved keywords.

故乡的云 2024-07-20 05:56:12

我不认为这是语言的一部分——也许是图书馆的一部分?

I don't think that's part of the language - maybe part of a library?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文