2012年3月31日 星期六

讓你的網頁適合在 iPhone 與 iPad 上瀏覽

讓你的網頁適合在 iPhone 與 iPad 上瀏覽
http://ios.com.tw/article.php?id=72




<script type="text/javascript">
if (navigator.userAgent.indexOf('iPhone')!=-1) {window.location.href = 'mobile.html'} else if (navigator.userAgent.indexOf('ipad')!=-1) {window.location.href = 'ipad.html'} else {window.location.href = 'pc.html'};
</script>

上面的寫法,可以讓判斷使用者使用的裝置,導引到適合不同裝置的頁面



P.S.

以此javascript語法也可以判斷使用者的瀏覽器,如下

  if(navigator.userAgent.indexOf("MSIE")>0) { 
       window.location.href = 'desktop.html' 
   } 
   if(isFirefox=navigator.userAgent.indexOf("Firefox")>0){ 
        window.location.href = 'desktop.html' 
   } 
   if(isSafari=navigator.userAgent.indexOf("Safari")>0) { 
        window.location.href = 'desktop.html' 
   }  
   if(isCamino=navigator.userAgent.indexOf("Camino")>0){ 
        window.location.href = 'desktop.html' 
   } 
   if(isMozilla=navigator.userAgent.indexOf("Gecko/")>0){ 
        window.location.href = 'desktop.html' 
   }

2012年1月8日 星期日

mac bootcamp安裝xp硬碟需Format成NTFS

BootCamp 3.0.4 不支援2010年後的mac安裝xp, 2010年的mac安裝xp時, windows 槽硬碟需format成NTFS格式,若維持使用原本的Fat32格式,在安裝完成重新啟動時會出現Disk Error  然後就無法開機囉!

安裝時,要使用'接近'正版的windows xp 光碟才會出現Format選項,有些"燒錄"版的windows安裝程式,會少掉這個步驟