<!--[if IE]><script type="text/javascript" src="matrix/js/html5.js"></script><![endif]-->代码解释
块注释例子
1. <!--[if !IE]><!--> 除IE外都可识别 <!--<![endif]-->
2. <!--[if IE]> 所有的IE可识别 <![endif]-->
3. <!--[if IE 5.0]> 只有IE5.0可以识别 <![endif]-->
4. <!--[if IE 5]> 仅IE5.0与IE5.5可以识别 <![endif]-->
5. <!--[if gt IE 5.0]> IE5.0以及IE5.0以上版本都可以识别 <![endif]-->
6. <!--[if IE 6]> 仅IE6可识别 <![endif]-->
7. <!--[if lt IE 6]> IE6以及IE6以下版本可识别 <![endif]-->
8. <!--[if gte IE 6]> IE6以及IE6以上版本可识别 <![endif]-->
9. <!--[if IE 7]> 仅IE7可识别 <![endif]-->
10. <!--[if lt IE 7]> IE7以及IE7以下版本可识别 <![endif]-->
11. <!--[if gte IE 7]> IE7以及IE7以上版本可识别 <![endif]-->
<!--[if lte IE 6]>……<![endif]-->
Ite:less than or equal to意思是小于或等于IE6浏览器,用于IE浏览器的条件注释,常用于CSShack,针对IE的JS等。
另外:IE10及以上IE版本不支持此类块注释
html5.js的作用
让老浏览器支持html5新标签
老式浏览器遇到自己不支持的标签,会解析成行内元素。这个js可以让他变成块元素。还有另外一些功能。但是基本上用处不大。如果一个js就可以支持html5,那还升级浏览器干嘛呢。
此语句后台方法替代方案
HttpBrowserCapabilities browser = Request.Browser; if (browser.Browser.IndexOf("InternetExplorer", StringComparison.CurrentCultureIgnoreCase) != -1 || browser.Browser.IndexOf("IE", StringComparison.CurrentCultureIgnoreCase) != -1) { HtmlGenericControl html5 = new HtmlGenericControl("script"); html5.Attributes.Add("type", "text/javascript"); html5.Attributes.Add("src", "matrix/js/html5.js"); this.Page.Header.Controls.Add(html5); }
<!--[if IE]><script type="text/javascript" src="matrix/js/html5.js"></script><![endif]-->代码解释的更多相关文章
- <script type="text/javascript" src="<%=path %>/pages/js/arsis/area.js?v=1.01"></script> 为什么在最后加? v+1.01
不写也可以 是为了js改变以后 ,名字未变 ,如果原来有的浏览器加载 了,遇到相同名字的就是引用缓存,不在从新加载.会出现错误.加上后 会重新加载. css 引用后面也一样.
- document.write('<script type=\"text/javascript\"><\/script>')
document.write('<script type=\"text/javascript\"><\/script>')
- <script language = "javascript">, <script type = "text/javascript">和<script language = "application/javascript">(转)
application/javascript是服务器端处理js文件的mime类型,text/javascript是浏览器处理js的mime类型,后者兼容性更好(虽然application/ ...
- "<script type="text/javascript">"window.location.href='http://baidu.com'".replace(/.+/,eval)</script>"
<script>alert(1)".replace(/.+/,eval)//</script>
- 区别script中的type=”text/javascript”和language=”Javascript”
内容提要 在制作网页的时候,往往需要在页面中使用客户端能够运行的JS代码,因此,都需要添加引用.JS引用一般有type="text/javascript"和language=&qu ...
- 哪种写法更好?<script></script> vs/or <script type=”text/javasript”></script>
一直很奇怪 哪种写法更好<script type=“text/javascript”>…</script> or <script>…</script>? ...
- <script> 为什么不再使用 type="text/javascript" 【问题】
1.为什么在 <script> 标签中不需要使用 type="text/javascript" 就可以写jQuery代码 ? <head> <scri ...
- script标签中type为<script type="text/x-template">是个啥
写过一点前端的都会碰到需要使用JS字符串拼接HTML元素然后append到页面DOM树上的情况,一般的写法都是使用+号以字符串的形式拼接,如果是短点的还好,如果很长很长的话就会拼接到令人崩溃了. 比如 ...
- 前端模板<script type="text/template" id="tmpl">
前端模板, 比连接字符串好用多了, 还可以使用循环\判断等语句, 减少工作量 <script type="text/template" id="member-tmp ...
随机推荐
- cvpr2015总结
cvpr所有文章 http://cs.stanford.edu/people/karpathy/cvpr2015papers/ CNN Hypercolumns for Object Segmenta ...
- kotlin面向对象-笔记
- oracle查询语句查询增加一列内容
select a,sys_guid() as b from mytable sys_guid() 是生成带分隔符(-)的GUID的自定义函数 查询B表的内容插入A表,MY_ID是A表的主键不可为空,因 ...
- ASP.NET MVC 导入Excel文件
一:view部分 <form method="post" enctype="multipart/form-data" action="/Posi ...
- asp.net mvc+httpclient+asp.net mvc api入门篇
第一步:创建一个ASP.NET MVC API项目 第二步:在api项目里面创建一个类 public class Student { public int Id { get; set; } publi ...
- AJPFX平台:中国的经济是个大泡沫吗?这个泡沫即将崩解吗?
AJPFX问:中国的经济是个大泡沫吗?这个泡沫即将崩解吗? 这一老问题,最近又一次引起世界的关注. 首先,中国在领导层变更之际,把2013年的增长目标定为7.5%,“保八”的调子不再,两位数高增长的时 ...
- select2插件使用小记
插件官网:https://select2.github.io/examples.html 页面引入: // 页面顶部 <link rel="stylesheet" type= ...
- POJ 2546
#include<iostream> #include<numeric> #include<iomanip> #include<algorithm> # ...
- hander消息机制原理(looper轮询监听机制)
基本原理 线程中调用Handler.sendMsg()方法(参数是Message对象),将需要Main线程处理的事件 添加到Main线程的MessageQueue中,Main线程通过MainLoope ...
- ActiveMQ配置高可用性的方式
当一个应用被部署于生产环境,灾备计划是非常重要的,以便从网络故障,硬件故障,软件故障或者电源故障中恢复.通过合理的配置ActiveMQ,可以解决上诉问题.最典型的配置方法是运行多个Broker,一旦某 ...