js的引入

来源:互联网 发布:尼泊尔旅游 知乎 编辑:程序博客网 时间:2024/06/06 17:40
<!DOCTYPE html><html><head>    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>    <script type="text/javascript">        //<!--            ....//javaScript代码                //xml中的标准注释        //-->    </script>    <script type="text/javascript">        //<![CDATA[            ....//javaScript代码 推荐        //]]>    </script></head><body>针对ie的限制(在其他浏览器中由于<!---->是注释,不显示)<!--te:就是Less than or equal to的简写,也就是小于或等于的意思。lt :就是Less than的简写,也就是小于的意思。gte:就是Greater than or equal to的简写,也就是大于或等于的意思。gt :就是Greater than的简写,也就是大于的意思。! :就是不等于的意思,跟javascript里的不等于判断符相同--><!--[if !IE]>除IE外都可识别 <![endif]--> <!--[if IE]> 所有的IE可识别 <![endif]--><!--[if IE 5.0]> 只有IE5.0可以识别 <![endif]--><!--[if IE 5]> 仅IE5.0与IE5.5可以识别 <![endif]--><!--[if gt IE 5.0]> IE5.0以及IE5.0以上版本都可以识别 <![endif]--><!--[if IE 6]> 仅IE6可识别 <![endif]--><!--[if lt IE 6]> IE6以及IE6以下版本可识别 <![endif]--><!--[if gte IE 6]> IE6以及IE6以上版本可识别 <![endif]--><!--[if IE 7]> 仅IE7可识别 <![endif]--><!--[if lt IE 7]> IE7以及IE7以下版本可识别 <![endif]--><!--[if gte IE 7]> IE7以及IE7以上版本可识别 <![endif]--><br/>css hack的实现,在ie下body背景显示红色,其他版本为黑色<style type="text/css">    body{        background-color: #FFF;    }</style>测试了一下,在ie10上背景并不显示为红色,,,,,,,,原来 ,,,IE10采用新的html5的解析规则 <!--[if IE]><style type="text/css">    body{        background-color: #F00;    }</style><![endif]--></body></html>

0 0
原创粉丝点击