/

HTML / CSS / JavaScript Tutorial

JavaScript Navigator method: javaEnabled()

[this page | pdf | back links]

The javaEnabled() method (when applied to Navigator objects in the JavaScript BOM) indicates whether the browser has Java enabled.

 

It has the following syntax with no parameters. It returns true if the browser has Java enabled, otherwise false.

 

navigator.javaEnabled()

 

EXAMPLE:


HTML USED IN THIS EXAMPLE:
<!DOCTYPE html>
<html> <!-- Copyright (c) Nematrian Limited 2018 -->
<head>
<style>
table,td,tr,th,caption {border: thin solid black; border-collapse: collapse;}
</style>
</head>
<body>
<table >
  <tr><th>Navigator method</th><th>Value returned</th></tr>
  <tr><td>javaEnabled()</td><td id="x1"></td></tr>
</table>

<script>
document.getElementById("x1").innerHTML = navigator.javaEnabled();
</script>

</body>
</html>


NAVIGATION LINKS
Contents | Prev | Next | JavaScript DOM (and BOM)


Desktop view | Switch to Mobile