【问题标题】:javascript usage in html tag [duplicate]html标签中的javascript使用[重复]
【发布时间】:2014-12-08 05:45:53
【问题描述】:
<!--[if lt IE 7]>      <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]>         <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]>         <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!-->
<html class="no-js">
<!--<![endif]-->

这是什么意思?为什么他们只将其应用于 IE(Internet Explorer)?

【问题讨论】:

  • 此查询由 Microsoft 引入,用于交叉浏览。幸运的是,它没有被 W3C 采用。所以它确实只存在于 IE 中。
  • 对不起,我想我实际上误读了你的问题。您是在谈论评论条件还是class="no-js" 属性?
  • 我在问这些评论条件是什么意思?

标签: javascript html


【解决方案1】:

那里没有 JavaScript。

这些是条件 cmets:旧版本 IE 支持的 hack,它误用 HTML 的注释语法来进行浏览器检测。

进一步阅读:

【讨论】:

    猜你喜欢
    • 2016-07-20
    • 2021-05-23
    • 2018-06-27
    • 2017-04-13
    • 1970-01-01
    • 1970-01-01
    • 2012-08-03
    • 2018-12-23
    • 1970-01-01
    相关资源
    最近更新 更多