--- title: NavigatorID.product slug: Web/API/NavigatorID/product translation_of: Web/API/NavigatorID/product ---
该属性返回当前浏览器的产品名称。
productName = window.navigator.product
productName 是一个字符串。<script>
function prod() {
dt = document.getElementById("d");
dt.innerHTML = window.navigator.product;
}
</script>
<button onclick="prod();">product</button>
<div id="d"> </div>
<!-- 返回 "Gecko" -->
在基于 Gecko 的浏览器中,product 为完整的用户代理(user agent)字符串中紧跟着平台(platform)后的部分。例如,在 Netscape 6.1 的用户代理中,product 是 "Gecko",完整的代理字符串是:Mozilla/5.0 (Windows; U; Win98; en-US; rv:0.9.2) Gecko/20010725 Netscape6/6.1。
在基于 WebKit 的浏览器中,product 仍然返回 "Gecko",即使完整用户代理字符串中平台(platform)后紧跟着:(KHTML, like Gecko)。
{{dom0}}