今天的浏览器真的没有隐藏javascript吗? [英] Do browsers today really not hide javascript?

查看:67
本文介绍了今天的浏览器真的没有隐藏javascript吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

(这不是这个问题)。

今天是否有任何浏览器,如果它们不支持javascript标签,则无法隐藏它?例如,带有adblock的Firefox不会运行javascript,但不会直接显示给用户。

Are there any browsers today that, if they do not support javascript tags, fail to hide it? E.g., Firefox with adblock will not run javascript, but will not display it directly to the user.

w3school教程声称你应该隐藏带有评论的javascript标签,如下所示:

This w3school tutorial claims you should hide javascript tags with comments, like this:

<script type="text/javascript">
<!--
document.getElementById("demo").innerHTML=Date();
//-->
</script>

否则这些浏览器将显示JS代码。今天这似乎有点无关......是吗?

otherwise these browsers will display the JS code. This seems a bit irrelevant today ... is it?

推荐答案


今天是否有任何浏览器,如果他们不支持javascript标签,则无法隐藏它?

Are there any browsers today that, if they do not support javascript tags, fail to hide it?

每个不支持<的浏览器; script> 标签无法隐藏它......但是今天市场上没有浏览器无法支持< script> (即使像Lynx一样,它的意思是这是一个脚本,我不支持这个,我会忽略它。

Every browser that does not support <script> tags fails to hide it… but no browser on the market today fails to support <script> (even if, like Lynx, it is in the sense of "This is a script, I do not support this, I will ignore it).

在我的头顶,我不能说当< script> 被引入时,它存在于 1997 HTML 3.2规范

Off the top of my head, I couldn't say when <script> was introduced, but it exists in the 1997 HTML 3.2 spec.


这个w3school教程

This w3school tutorial

W3Schools ...错误......糟透了。

W3Schools … err … suck.

评论技巧是为Netscape 2时代的浏览器提供的。

The comment trick was provided for Netscape 2 era browsers.

在HTML文档中它是毫无价值的在XHTML文档中有害。

It is worthless in an HTML document, and actively harmful in an XHTML document.

前一段时间,我写过关于的文章这个历史

A while ago, I wrote about the history of this.

这篇关于今天的浏览器真的没有隐藏javascript吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆