2010년이 돼서도 차별대우는 어쩔 수 없다.

var isMSIE = /*@cc_on!@*/false;

// or shorter one next

var isMSIE//@cc_on=1

Dean Edwards씨가 몇 년전 쌀짝 공개했던 코드로 알려지게 되었는데, Internet Explorer에서만 채용된 JavaScript의 짝퉁, JScript의 Conditional Compilation Statements때문이란다.

혹은 더 짧게,

if(!+"\v1") // true only in IE

관련된 주제의 글

댓글을 남겨 주세요

:wink: :-| :-x :twisted: :) 8-O :( :roll: :-P :oops: :-o :mrgreen: :lol: :idea: :-D :evil: :cry: 8) :arrow: :-? :?: :!: