Check whether Javascript is enabled

后端 未结 9 2209
礼貌的吻别
礼貌的吻别 2020-12-29 13:47

Is there a way to check whether Javascript is enabled or supported by the browser? If it\'s not supported, I would like to redirect the user to a user-friendly error page. <

9条回答
  •  醉话见心
    2020-12-29 14:11

    Yes. Make you have the latest jQuery.

    Javascript:

    $(function(){ $('#jsEnabled2').html('Yes it is') }) 
    

    PHP:

    $js - 'No'; 
    $jscheck = 'Javascript Enabled: '; 
    $jscheck .= ''.$js.'';
    print $jscheck;
    

提交回复
热议问题