html中If语句详解
来源:才华咖 本文已影响3.94K人
来源:才华咖 本文已影响3.94K人
if语句的代码的语法非常简单,就是一个 if 判断语句来判断浏览器的类型和版本,使用类似 <!--[if lte IE 6]> 和 <![endif]--> 语法结构包含起来,代表如果浏览器是 IE 并且版本号低于或等于 6.0 则进行提示。类似的'语法还有:
<!--[if IE]>
这样使用IE浏览器(全部版本)的人都看得到。
<![endif]-->
<!--[if IE 6]>
这样IE 6.0版本会看得到,只限IE 6.0版本。
<![endif]-->
<!--[if lt IE 6]>
这样IE 6.0以下版本会看得到,不包含6.0。
<![endif]-->
<!--[if lte IE 6]>
这样IE 6.0以下版本会看得到,包含6.0。
<![endif]-->
<!--[if lte IE 8]>
这样IE 8.0以下版本会看得到,包含8.0。
<![endif]-->
<!--[if gt IE 5]>
这样IE 5.0以上版本会看得到,不包含5.0
<![endif]-->
<!--[if gte IE 5]>
这样IE 5.0以上版本会看得到,包含5.0
<![endif]-->
说明:
* gt:greater than (版本号大于)
* lt:less than (版本号小于)
* gte:greater than or equal to (版本号大于等于)
* lte:less than or equal to (版本号小于等于)
The Impact of Information Explosion高中英语作文
初中英语作文:The Mid-Autumn Festival
Letter that Changed My Life大学英语作文
The Advice From Hollywood Female Stars高中英语作文
The Rich Family英语美文
The mountains the most beautiful female teachers英语作文
My High School Life 高中英语作文
The Mid-Autumn Festival中秋节英语作文
The First Time to Make Dumplings英语作文及译文
高中英语作文how to use time effectively
英语短文:City Life Compared with Rural Life
如何解决ghost安装系统本地硬盘显示invalid switch fmount问题
高中英语作文:Smart tech makes life simpler
中考英语难点语法详解difficulty的重要搭配
My family.I love them英语作文
My favorite Chinese festival初中英语作文范文
了解HTML中table表格的frame和rules属性
英语作文阅读:Bad News for the Highly Intelligent
HTML input file控件限制上传文件类型
词语堤岸详细解析及造句
HTML了解一些HTML标记介绍
幼儿英语歌词及翻译Thefingerfamily
最新《Fate/Stay Night Unlimited Blade Works》经典名句
At Climate Summit, Hope for Emissions Deal美文欣赏
with difficulty怎么用汉语翻译
My healthy lifestry英语作文
Catch of a Lifetime 一生的收获英语文章阅读
英语作文:this is my family
Youthful Times年轻时代初中英语作文
The OLYMPIC FLAG英语作文
最新《英语课程标准》详细解读
This is my family这是我家英语作文
from One Child Families英语四级作文
The MidAutumn Festival英语作文
i still remember that halloween英语作文
How Li Ming Keeps Healthy 高中英语作文
Lua中if ... else语句的详解用法
HTML5的Audio标签使用详解
少儿英语小故事:She Practices Flips for the Olympic
The Mid-Autumn Festival英语作文