????? ??
navigator
navigator ??? ???? ??? ?????. ?? ????? ???? ??? ??? ????.
navigator.appName: ???? ??; >
- navigator.appVersion: ???? ??
- navigator.??: ???? ?? ??
- .platform: ?? ?? ??,
- navigator.userAgent: ?????? ??? ??? ???? ???.
<html> <head> <script> 'use strict'; alert('appName = ' + navigator.appName + '\n' + 'appVersion = ' + navigator.appVersion + '\n' + 'language = ' + navigator.language + '\n' + 'platform = ' + navigator.platform + '\n' + 'userAgent = ' + navigator.userAgent); </script> </head> <body> </body> </html>????? ??? ???? ?? ??? ? ?? ??? ??????? ??? ?? ??? ????? ?? ? ??? ?????. ??? ????? ?? ??? ??? ???? ?? ?? ???? ???? ??? ???? ?? if? ???? ?? ?????. ?:
if (getIEVersion(navigator.userAgent) < 9) { width = document.body.clientWidth; } else { width = window.innerWidth; }??? ??? ?? ??? ???? ? ?? ??? ????? ?????. ??? ??? ???? ?? ??? ?? ???? ?? ?? ???? JavaScript? ??? ??? ???? ?? ??? ||? ?? ???? ??? ???? ????.
var width = window.innerWidth || document.body.clientWidth;