这个HTML语法来自哪里? [英] were does this HTML syntax come from?

查看:108
本文介绍了这个HTML语法来自哪里?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

最近看了一个HTML文档,我发现这个语法对我来说是全新的


<![if!supportAnnotations]>

< style> ...< / style>

<![endif]>


看起来成为某种条件逻辑,但它不在javascript

块中,只是在普通的HTML标记中。没有任何一个浏览器对它进行了例外处理

它没有尝试定义或设置变量supportAnnotations

在任何地方,所以我不确定它是否引用了一些内置变量或

什么。


任何人都可以指出我的任何内容解释了这个语法?


TIA


Andy

Looking at an HTML document recently, I found this syntax which was
completely new to me

<![if !supportAnnotations]>
<style>...</style>
<![endif]>

it looks to be some kind of conditional logic but it''s not in a javascript
block, just in the normal HTML markup. none of by browsers took exception to
it

there was no attempt to define or set the variable "supportAnnotations"
anywhere, so I''m not sure if it''s referencing some built-in variable or
what.

Can anyone point me at anything which explains this syntax?

TIA

Andy

推荐答案

Andy Fish写道:
Andy Fish wrote:
最近看了一个HTML文档,我发现这个语法对我来说是全新的

<![if!supportAnnotations] >
< style> ...< / style>
<![endif]>
Looking at an HTML document recently, I found this syntax which was
completely new to me

<![if !supportAnnotations]>
<style>...</style>
<![endif]>




它是'微软发明的专有垃圾只能在他们所谓的网络浏览器中工作。您不应该尝试在公共场所使用它。

互联网。



It''s proprietary garbage invented by Microsoft which will only work in
their so-called Web browser. You shouldn''t try to use it on the public
Internet.





Andy Fish写道:


Andy Fish wrote:
最近看了一个HTML文档,我发现这个语法对我来说是全新的

<![if! supportAnnotations]>
< style> ...< / style>
<![endif]>

它看起来像某种条件逻辑但是它不在javascript
块中,只是在普通的HTML标记中。没有一个浏览器对它进行了例外处理

没有尝试在任何地方定义或设置变量supportAnnotations
,所以我不确定它是不是引用一些内置变量或
什么。

任何人都可以指出任何解释这种语法的东西吗?
Looking at an HTML document recently, I found this syntax which was
completely new to me

<![if !supportAnnotations]>
<style>...</style>
<![endif]>

it looks to be some kind of conditional logic but it''s not in a javascript
block, just in the normal HTML markup. none of by browsers took exception to
it

there was no attempt to define or set the variable "supportAnnotations"
anywhere, so I''m not sure if it''s referencing some built-in variable or
what.

Can anyone point me at anything which explains this syntax?




这可能是尝试使用MS IE的条件评论:
http://msdn.microsoft.com/library/de...omment_ovw.asp


-


Martin Honnen
http: //JavaScript.FAQTs.com/


Leif K-Brooks< eu ***** @ ecritters.biz>在新闻中写道:312vh2F35vu4nU1 @ uni-

berlin.de:
Leif K-Brooks <eu*****@ecritters.biz> wrote in news:312vh2F35vu4nU1@uni-
berlin.de:
Andy Fish写道:
Andy Fish wrote:
最近查看HTML文档,我发现这个语法对我来说是全新的

<![if!supportAnnotations]>
< style> ...< / style>
<![endif]>
Looking at an HTML document recently, I found this syntax which was
completely new to me

<![if !supportAnnotations]>
<style>...</style>
<![endif]>


这是微软发明的专有垃圾,只能在他们所谓的网络浏览器中使用。你不应该尝试在公共网站上使用它。



It''s proprietary garbage invented by Microsoft which will only work in
their so-called Web browser. You shouldn''t try to use it on the public
Internet.




使用这些条件评论的形式对过滤非常有用
但是b $ b hacks或内容到特定版本的Internet Explorer:

http://www.quirksmode.org/css/condcom.html


验证,所有非IE浏览器都会忽略它。


-

paul haine
http://joeblade.com/
http:// design .joeblade.com /



Using a form of these conditional comments is very useful for filtering
hacks or content to specific versions of Internet Explorer, though:

http://www.quirksmode.org/css/condcom.html

Validates, and all non-IE browsers will ignore it.

--
paul haine
http://joeblade.com/
http://design.joeblade.com/


这篇关于这个HTML语法来自哪里?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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