返回资讯中心
外部精选
软件工程
#开发者实时流

JavaScript Is Being Executed

If you see this, that probably means your browser is not executing javascript.

Hacker News 最新robalni2026/11/1 · 今天3 分钟阅读

以下正文同步自 Hacker News 最新,版权归原站所有,已转换为易读排版。

Hi! If you see this, that probably means your browser is not executing javascript. Congratulations!

However, if you use a browser that executes javascript, then the contents of this page will be replaced by the following message:

You are using a browser that runs arbitrary scripts hidden in web pages. This is not how the web should work and this site is therefore intentionally not part of that web.

To view this page, please, turn off javascript or switch to a browser that does not execute javascript.

It is very easy to implement such a message. All you need to do is to add the following line of code right before the closing </body> tag:

<script>document.body.innerHTML="<h1>Javascript is being executed</h1><p>You are using a browser that runs arbitrary scripts hidden in web pages. This is not how the web should work and this site is therefore intentionally not part of that web.</p><p>To view this page, please, turn off javascript or switch to a browser that does not execute javascript.</p>"</script>

document.body.innerHTML="Javascript is being executed

You are using a browser that runs arbitrary scripts hidden in web pages. This is not how the web should work and this site is therefore intentionally not part of that web.

To view this page, please, turn off javascript or switch to a browser that does not execute javascript.

正文由 探How 从来源站点 RSS 同步,内容未经改写;遇到排版缺失或需要图片、视频时请以原文为准。

打开原文
去社区讨论 →