Navigator.productSub

Navigator.productSub 只读属性返回当前浏览器的编译版本号。 

语法

prodSub = window.navigator.productSub
  • prodSub是一个字符串。

例子

<script> 
function prodsub() {
  var dt = document.getElementById("d").childNodes[0];
  dt.data = window.navigator.productSub;
} 
</script>

<button onclick="prodsub();">productSub</button>
// returns: 20010725

注释

在IE上,这个属性返回undefined。

在苹果Safari上和Google的Ghrome上这个属性总是返回20030107。

说明

说明 状态 注释
HTML Living Standard
NavigatorID: productSub
Living Standard Initial definition

浏览器兼容性

Update compatibility data on GitHub
DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
productSub
Non-standard
Chrome Full support Yes
Notes
Full support Yes
Notes
Notes Always returns 20030107.
Edge Full support 12Firefox Full support YesIE Full support Yes
Notes
Full support Yes
Notes
Notes Always returns undefined.
Opera Full support YesSafari Full support Yes
Notes
Full support Yes
Notes
Notes Always returns 20030107.
WebView Android Full support YesChrome Android Full support Yes
Notes
Full support Yes
Notes
Notes Always returns 20030107.
Firefox Android Full support YesOpera Android Full support YesSafari iOS Full support Yes
Notes
Full support Yes
Notes
Notes Always returns 20030107.
Samsung Internet Android Full support Yes

Legend

Full support  
Full support
Non-standard. Expect poor cross-browser support.
Non-standard. Expect poor cross-browser support.
See implementation notes.
See implementation notes.