The javaEnabled()
method tells
whether the browser has Java enabled.
javaEnabled |
Yes | Yes | Yes | Yes | Yes |
navigator.javaEnabled()
None.
Type | Description |
---|---|
Boolean | Tells whether the browser has Java enabled. |
The following code shows how to determine whether your browser has Java enabled.
<!DOCTYPE html>
<html>
<body>
<button onclick="myFunction()">test</button>
<p id="demo"></p>
<script>
function myFunction() {<!-- w w w.j av a 2 s.c o m-->
var x = "Java Enabled: " + navigator.javaEnabled();
document.getElementById("demo").innerHTML = x;
}
</script>
</body>
</html>
The code above is rendered as follows: