HTML DOM userAgent ÊôÐÔ

¶¨ÒåºÍÓ÷¨

userAgent ÊôÐÔÊÇÒ»¸öÖ»¶ÁµÄ×Ö·û´®£¬ÉùÃ÷ÁËä¯ÀÀÆ÷ÓÃÓÚ HTTP ÇëÇóµÄÓû§´úÀíÍ·µÄÖµ¡£

Ò»°ãÀ´½²£¬ËüÊÇÔÚ navigator.appCodeName µÄÖµÖ®ºó¼ÓÉÏбÏßºÍ navigator.appVersion µÄÖµ¹¹³ÉµÄ¡£

ÀýÈ磺Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; SV1; .NET CLR 1.1.4322)¡£

×¢£ºÓû§´úÀíÍ·£ºuser-agent header¡£

Óï·¨

navigator.userAgent

ʵÀý

<html>

<body>
<script type="text/javascript">
document.write("<p>UserAgent: ")
document.write(navigator.userAgent + "</p>")
</script>
</body>

</html>
VUE