var firefox = document.getElementById && !document.all;


IE浏览器和FireFox浏览器都有getElementById方法,而FireFox没有document.all方法,因此当上面firefox变量为false说明为IE浏览器。
posted @ 2007-07-06 11:22 dannyr|一个都不能少! 阅读(492) | 评论 (0)编辑