English 中文(简体)
What s the point of the javascript navigator.javaEnabled function?
原标题:

The navigator object has a javaEnabled function that indicates if the browser has javascript support. This seems to be a little odd:

  • If JS is indeed enabled the function will return true, well obviously.
  • If JS is disabled it will return <nothing> since it is never run, javaScript is disabled.

I must be missing something here, or is it really that useless this function?

问题回答

java!= javaScript

navigator.javaEnabled checks for the presence of Java, not JavaScript.

Reference

This must be a relic from the olden days when Java applets were going to be the future of the web...

You missed the fact that it s javaEnabled not javascriptEnabled.

navigator.javaEnabled: Indicates whether the host browser is Java-enabled or not.

https://developer.mozilla.org/en/dom/window.navigator





相关问题
JqGrid setCell method, inserts blank row in the grid

I have a portion of code to update a cell value like this: jQuery("#myGridDiv").jqGrid( setCell , myRowToEdit, myColToEdit, myNewValue); that s about it, and sometimes it happens that a blank dummy ...

Jquery calendar and tab sliding div clash

Hey all, I am trying my best to figure out another way around this problem I seem to have encountered. On my website I have a jquery calendar and also a jquery div tab slider (this: http://www.queness....

Fixing a project with multiple Javascript frameworks

I just started a new job, and my first task is to clean up the Javascript code for the site - the problem is that there are two JS libraries being used (jQuery and Prototype / Scriptaculous). I m ...

Promising alternatives for javascript framework? [closed]

Popular JavaScript frameworks/libraries like jQuery, MooTools, Prototype, and YUI (to name a few of the most popular JavaScript frameworks out there) definitely have a solid foothold in the JavaScript ...

Is this scoping possible in javascript?

I am working on a javascript framework. I have several independent scripts that look like this: core.modules.example_module = function(sandbox){ console.log( wot from constructor == , wot); ...

Drawbacks of KSS [closed]

Has anyone here used KSS? KSS is an AJAX framework. KSS has both a client-side Javascript library and server-side support. The client-side Javascript library needs to be included in your page. It ...

热门标签