Find out if your browser has Java enabled:
var x = "Java Enabled: " + navigator.javaEnabled();
Click the button to find out if your browser has Java enabled.
<!DOCTYPE html> <html> <body> <button onclick="myFunction()">Test</button> <p id="demo"></p> <script> function myFunction() {/*from www. j ava2 s . c o m*/ var x = "Java Enabled: " + navigator.javaEnabled(); document.getElementById("demo").innerHTML = x; } </script> </body> </html>
The javaEnabled()
method returns a Boolean value that specifies whether the browser has Java enabled.
javaEnabled() ;