www.webdeveloper.com
Results 1 to 2 of 2

Thread: How to check Javascript is enabled or not

  1. #1
    Join Date
    Nov 2004
    Posts
    1

    How to check Javascript is enabled or not

    I want to check through my code whether javascript on client's machine is enabled or disabled. Is there any code which can do suich kind of work

    if(Javascript enabeld)
    {
    do this------
    }
    else
    {
    do this----
    }

    can you tell me the condition required here

    Regards
    Ankur

  2. #2
    Join Date
    Dec 2002
    Location
    Manchester, UK
    Posts
    6,275
    Well if JavaScript isn't enabled then your JavaScript code won't run, simple as that.
    Code:
    <script type="text/javascript">
      document.write("<p>JavaScript is enabled.</p>");
    </script>
    
    <noscript>
      JavaScript is not enabled or not supported.
    </noscript>
    Every fight is a food fight when you’re a cannibal.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles