關於 PHP, Linux, Open Source 及個人生活記載的網誌。
RSS icon
  • Javascript 偵測 IE7

    Posted on October 10th, 2006 Sam Tang No comments

    IE7 快將推出,而預計微軟也會用 Windows Update 要用戶更新,這樣對於 AJAX 的程式來說,偵測 IE7 及 IE6 就十分重要。在 Abe Fettig’s Weblog 看到可以用這段 Javascript 代碼完成:

    CODE:
    1. if (typeof document.body.style.maxHeight != "undefined") {
    2.   // IE 7, mozilla, safari, opera 9
    3. } else {
    4.   // IE6, older browsers
    5. }


    Leave a reply

    *
    To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
    Click to hear an audio file of the anti-spam word