摘要:
1.jQuery 1.9 移除了 $.browser 和 $.browser.version使用jQuery.support来代替(jQuery 2.0版本中,将不再支持 IE 6/7/8。)如果用户需要支持 IE 6/7/8,只能使用 jQuery 1.9。 如果要全面支持 IE,并混合使用 jQuery 1.9 和 2.0, 官方的解决方案是: 检查是否为 IE6:// Oldif ($.browser.msie && 7 > $.browser.version) {}// Newif ('undefined' == typeof(document.b 阅读全文
posted @ 2013-10-17 17:11
hlp鹏
阅读(109)
评论(0)
推荐(0)
摘要:
例子:$(document).ready(function() { $("#orderedlist li:last").hover(function() { $(this).addClass("green"); },function(){ $(this).removeClass("green"); # $(this) }); });$(document).ready(function() { // use this to reset several forms at once $("#reset").click(f 阅读全文
posted @ 2013-10-17 17:09
hlp鹏
阅读(280)
评论(0)
推荐(0)
摘要:
javascript部分//先判断是否是ie6if(/msie|MSIE 6/.test(navigator.userAgent)){ // search for selectors you want to add hover behavior to $('.jshover').hover( function(){ $(this).addClass('over'); }, function(){ $(this).removeClass('over'); }}或者: Special instructions for IE 6 here... e.g 阅读全文
posted @ 2013-10-17 16:50
hlp鹏
阅读(120)
评论(0)
推荐(0)
摘要:
背景在搜索引擎中搜索关键字.htaccess 缓存,你可以搜索到很多关于设置网站文件缓存的教程,通过设置可以将css、js等不太经常更新的文件缓存在浏览器端,这样访客每次访问你的网站的时候,浏览器就可以从浏览器的缓存中获取css、js等,而不必从你的服务器读取,这样在一定程度上加快了网站的打开速度,又可以节约一下你的服务器流量。问题现在问题来了,.htaccess设置的css、js缓存都有一个过期时间,如果在访客的浏览器中已经缓存了css、js,在这些css、js缓存未过期之前,浏览器只会从缓存中读取css和js,如果你在服务器上修改了css和js,那么这些更改在回头客的浏览器中是不会有变化的 阅读全文
posted @ 2013-10-17 16:03
hlp鹏
阅读(153)
评论(0)
推荐(0)
摘要:
判断IE浏览器:1.+[1,]2.!+"\v1" (利用的是ie不支持垂直制表符的特性)3.!!(window.attachEvent && navigator.userAgent.indexOf('Opera') === -1) (库prototype的方法,navigator.userAgent.indexOf('Opera') === -1是因为opara浏览器能伪装成ie)4.!!(!window.addEventListener&& navigator.userAgent.indexOf('O 阅读全文
posted @ 2013-10-17 15:50
hlp鹏
阅读(244)
评论(0)
推荐(0)
摘要:
Mozilla中:addEventListener的使用方式:target.addEventListener(type, listener, useCapture);target: 文档节点、document、window 或 XMLHttpRequest。type: 字符串,事件名称,不含“on”,比如“click”、“mouseover”、“keydown”等。 listener :实现了 EventListener 接口或者是 JavaScript 中的函数。 useCapture :是否使用捕捉,一般用 false 。例如:document.getElementById("t 阅读全文
posted @ 2013-10-17 15:02
hlp鹏
阅读(399)
评论(0)
推荐(0)

浙公网安备 33010602011771号