所以,在這邊我要教大家如何使用 IE 的 debugger 讓你更快速的解決 IE only bug。
首先,我們可以看到,該死的 IE 亂跳錯誤,明明其他瀏覽器都沒錯
Life is not measured by the number of breaths we take, but by the moments that take our breath away. - Hilary Cooper
AddType video/webm webm就這麼簡單…加上了之後我的 Firefox 就可以正常播放 webm 影片了…
\ | webm | ogv | mp4 |
Chrome 13.0.749.0 | ● | ● | ● |
Firefox 6.0a1 | ● | ● | ○ |
Opera 11 | ● | ● | ○ |
Safari 5 | ○ | ○ | ● |
IE 10 pp2 | ○ | ○ | ● |
IE 9 | ○ | ○ | ● |
<!DOCTYPE HTML> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title></title> </head> <body> <video id="movie" width="640" height="352" preload controls> <source src="test.mp4" type='video/mp4; codecs="avc1.42E01E, mp4a.40.2"' /> <source src="test.webm" type='video/webm; codecs="vp8, vorbis"' /> <source src="test.ogv" type='video/ogg; codecs="theora, vorbis"' /> </video> </body> </html>
$.get(url + new Date().getTime(), function(data){ alert(data); });這問題其實超常遇到(因為IE一直活著 XD),可是每次都要 google 一次 -____- 所以寫下來看會不會加深印象…
注意
1. 此效果雖然跟 Kaie's Blog 很像,但除了 var fade 的效果啟動變數之外,其他都未參考他的程式碼。
2. 此效果採用了 jQuery 的 javascript Library,如果您已經採用其他 javascript Library 可能會因為衝突而無法正常顯示。
3. 部份語法由 Tony 提供。
步驟一:請先從 jQuery 下載 Download jQuery 1.2.6 (16kb, Minified and Gzipped)。
步驟二:將這個檔案傳到您的網頁空間。(googlepage也可以)
步驟三:在模板中加入這個 script 的連結。
<script src="http://yourwebsite/jquery-1.2.6.min.js" type="text/javascript"></script>
步驟四:將相關的 function 用下列的 function 取代
/* true 啟用淡入淡出效果,false 取消淡入淡出效果*/
var fade = true;
function showFull(id) {
var par= $("#"+id);
$("[id=hidelink]",par).css("display","inline");
$("[id=showlink]",par).css("display","none");
$("[id=fullpost]",par).fadeIn('slow');
$("img",par).fadeIn('slow');
}
function hideFull(id) {
var post = document.getElementById(id);
var par= $("#"+id);
$("[id=hidelink]",par).css("display","none");
$("[id=showlink]",par).css("display","inline");
$("[id=fullpost]",par).fadeOut('slow');
$("img",par).fadeOut('slow');
post.scrollIntoView(true);
}
<link rel="shortcut icon" href="favicon.ico" />
1. 支援gif、jpg、png、bmp,必須15KB以下 [↩]
2. 不支援中文會自動轉為UTF8編碼文字 [↩]
相關連結是本篇文章的原始出處。