如何寫一個跨Browser的js呢?

Posted by on | |
眾多瀏覽器而有的眾多各自的標準...
紛亂的源頭,也是繽紛的色彩...

如何寫一個跨Browser的js呢?

Migrate apps from Internet Explorer to Mozilla --
http://www-128.ibm.com/developerworks/web/library/wa-ie2mozgd/

其中最喜歡一個function

function getElement(aID){
return (document.getElementById) ? document.getElementById(aID)
: document.all[aID];
}

0 意見: