모바일 WEB 관련2010. 6. 3. 22:48
<script>
//불여우 2/3 버전 감지 by DoctorDan
var FF=/a/[-1]=='a';

//불여우 3 by 원작자
var FF3=(function x(){})[-5]=='x';

//불여우 2 by 원작자 
var FF2=(function x(){})[-6]=='x';

//자신이 전에 올렸던 IE 감지
var IE='\v'=='v';

//사파리 by 원작자
var Saf=/a/.__proto__=='//';

//크롬 by 원작자
var Chr=/source/.test((/a/.toString+''));

//오페라 by 원작자
var Op=/^function \(/.test([].sort);

//위에 모든걸 통틀어 브라우저 인식하는 한줄 스크립트 
var B=(function x(){})[-5]=='x'?'FF3':(function x(){})[-6]=='x'?'FF2':/a/[-1]=='a'?'FF':'\v'=='v'?'IE':/a/.__proto__=='//'?'Saf':/s/.test(/a/.toString)?'Chr':/^function \(/.test([].sort)?'Op':'Unknown'

//보너스:링크 #2에서 발췌한 IE 감지 스크립트 
var IE=!!top.execScript
document.write(B);
</script>
<SPAN id=tx_marker_caret></SPAN>


출처 : http://towis.net/2690114
Posted by windship