<无脚本>东西不适用于 google chrome

发布于 2024-08-31 20:16:30 字数 73 浏览 2 评论 0原文

我想在禁用 javascript 时在我的网站顶部显示一条消息(就像在 SO 上一样),但在 google chrome 上不起作用

I wanted to display a message on the top of my site when the javascript is disabled (just like on SO), but on google chrome is not working

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

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

发布评论

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

评论(5

杯别 2024-09-07 20:16:30

看起来是这样。

您可以使用 javascript 隐藏“noscript”消息。

Looks that way.

You can use javascript to hide a 'noscript' message.

一向肩并 2024-09-07 20:16:30

奇怪的。我可以在 Chrome 4.1.249.1064 (45376) 中重现此内容,

但我找不到它,因此方法如下:

您可以在“选项”>“Chrome 浏览器”中禁用 JavaScript引擎盖下>隐私>内容>> JavaScript >

Odd. I can repro this in Chrome 4.1.249.1064 (45376)

I had trouble finding it, so here's how:

you can disable JavaScript on Chrome in Options > Under the Hood > Privacy > Content > Javascript >

但可醉心 2024-09-07 20:16:30

我有当前版本:版本30.0.1599.69 m,可以确认相同或类似的问题。
禁用 javascript 后,

请注意,这种情况只会发生一次:JavaScript 被禁用后的第一次。此后,一切都好。刷新屏幕并显示

I have the current version: Version 30.0.1599.69 m and can confirm the same or a similar issue.
With javascript disabled, html within the <noscript> tag displays verbatim, not rendered as html html is supposed to format.

Note, this happens one time and one time only: the first time after javascript is disabled. Thereafter, all is well. Refresh the screen and <noscript> works as expected. As such, someone browsing with javascript routinely disabled would not generally experience the quirk.

丶情人眼里出诗心の 2024-09-07 20:16:30

嗯...我已经打开了 Google Chrome,并发出了 Javascript:

 c:\Documents and Settings\grzole\Local Settings\Application Data\Google\Chrome\Application>chrome -disable-javascript

当访问互联网上找到的一些 示例时,我可以看到以下消息:

http://www.java2s.com/Code/HTMLCSS/Object-Tags/noscriptExample.htm

http://www.java2s.com/Code/HTMLCSSDemo/noscriptExample.htm

所以看起来它正在工作。我有谷歌浏览器 2.0.172.39。

Hmmm... I've opened Google Chrome with Javascript issuing:

 c:\Documents and Settings\grzole\Local Settings\Application Data\Google\Chrome\Application>chrome -disable-javascript

And when visiting some <noscript> example found on Internet I can see the message:

http://www.java2s.com/Code/HTMLCSS/Object-Tags/noscriptExample.htm

http://www.java2s.com/Code/HTMLCSSDemo/noscriptExample.htm

So it looks like it's working. I have Google Chrome 2.0.172.39.

单挑你×的.吻 2024-09-07 20:16:30

我可以使用当前的 Chrome (4.1.249.1064) 确认此错误。
这似乎不是 Webkit 问题,因为其他基于 Webkit 的浏览器支持该标签。

虽然用 Javascript 隐藏文本是可能的,但这并不是一个真正的选择;
noscript 标签是 w3c 标准的一部分,因此声称符合标准的浏览器应该支持它。

I can confirm this bug with current Chrome (4.1.249.1064).
It seems not to be a Webkit issue because other webkit-based Browsers support the tag.

Although hiding the text with Javascript may be possible, it is not really an option;
the noscript tag is part oof the w3c standard an so it should be supported by a browser that claims to be standards compliant.

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