Navigator javaEnabled()Method

Navigator 对象参考手册Navigator Object

Definition and Usage

The javaEnabled() method returns a Boolean value indicating whether the browser supports and enables Java. If so, it returns true; otherwise, it returns false.

Syntax

navigator.javaEnabled()


Browser Support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the javaEnabled() method.


Examples

Examples

The following example will return a Boolean value indicating whether Java is enabled in the current browser:

<html>
<body>

<script>
document.write("Java enabled: " + navigator.javaEnabled());
</script>

</body>
</html>

Output:


Try it Yourself »


Navigator 对象参考手册Navigator Object Other Extensions