Possible Duplicate:
How to detect if JavaScript is disabled?
if i am disable my javascript from browser settings, its stopped working, do i know the best way to recommend the user to enable its broswer javascript if by default it has off ? Any help ? or how can my code will detect of the javascript is off from browser or not :/
Any help ?
If you for some reason don’t want to use the
<noscript>tag, or if you want to do the reverse (show some content only if JavaScript is enabled), you can make an element hidden by default (setdisplay:none;through CSS). Then you have a small JavaScript add an additional-class to the element, sayjs-enabled. You can then you have a CSS-rule:When your JavaScript applies the class, the element will become visible. If the user doesn’t have JavaScript enabled, the class will not be added and the element will stay hidden.