检查javascript启用/禁用 [英] check javascript enable/disable

查看:66
本文介绍了检查javascript启用/禁用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

检查是否以html格式启用了javscript.

check whether javscript is enable or not in html form

推荐答案

<script>
  alert("JavaScript is enabled.");
</script>

<noscript>
  JavaScript is not enabled or not supported.
</noscript>


这也应该起作用.如果浏览器上的JavaScript被禁用,它将输出一条消息以及有关如何启用它的链接.

This should work too. If the JavaScript on the browser is disabled it will output a message and a link on how to enable it.

<noscript style="font-size: 18px; color: red; font-weight:bold">Javascript is disabled:<a href="https://www.google.com/adsense/support/bin/answer.py?hl=en&amp;answer=12654"target="_blank">Click here to learn how to enable it before continue.</a>&nbsp;<br/></noscript>


以下链接为您提供了此处介绍的解决方案的一些解释

http: //aspadvice.com/blogs/azamsharp/archive/2007/09/30/Check-If-the-JavaScript-is-Enabled-on-the-Client_2700_s-Browser.aspx [
The following link gives you some explanation on the solutions presented here

http://aspadvice.com/blogs/azamsharp/archive/2007/09/30/Check-If-the-JavaScript-is-Enabled-on-the-Client_2700_s-Browser.aspx[^]


这篇关于检查javascript启用/禁用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆