Created
November 5, 2018 01:42
-
-
Save SooJungChae/4cfd9360215dc29a5f1665e0678e4277 to your computer and use it in GitHub Desktop.
브라우저 체크
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function checkIE() { | |
var agent = navigator.userAgent.toLowerCase(); | |
if ( (navigator.appName == 'Netscape' && agent.indexOf('trident') != -1) || (agent.indexOf("msie") != -1)) { | |
// ie일 경우 | |
return true; | |
}else{ | |
// ie가 아닐 경우 | |
return false; | |
} | |
} | |
function checkChrome() { | |
var agent = navigator.vendor.toLowerCase(); | |
if ( agent.indexOf("google") != -1) { | |
// chrome 일 경우 | |
return true; | |
}else{ | |
// chrome이 아닐 경우 | |
return false; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment