How to detect if JavaScript is disabled?

后端 未结 30 3471
暗喜
暗喜 2020-11-21 07:37

There was a post this morning asking about how many people disable JavaScript. Then I began to wonder what techniques might be used to determine if the user has it disabled.

30条回答
  •  眼角桃花
    2020-11-21 08:10

    Working Example:

    
    
    
        My website
        
        
        
    
    
        
    Please enable JavaScript...
    JavaScript dependent content here...

    In this example, if JavaScript is enabled, then you see the site. If not, then you see the "Please enable JavaScript" message. The best way to test if JavaScript is enabled, is to simply try and use JavaScript! If it works, it's enabled, if not, then it's not...

提交回复
热议问题