기초탄탄
[JavaScript] IE 브라우저 체크
✨sunee✨
2022. 7. 7. 20:19
// IE 체크
var agent = navigator.userAgent.toLowerCase();
if ((navigator.appName == 'Netscape' && navigator.userAgent.search('Trident') != -1) ||
(agent.indexOf("msie") != -1)) { }
|
- IE 11: navigator.appName == 'Netscape' && navigator.userAgent.search('Trident') != -1
- IE 10이하: agent.indexOf("msie") != -1
※ 참고하기