验证是否启用了Javascipt [英] Verify Javascipt is enabled or not

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

问题描述

我要验证是否启用了JavaScript

如果禁用,请启用它

如何处理asp.net通过JavaScript

在Advance中感谢

I want verify JavaScript is enabled or not

If disabled so enable it

how to handle using asp.net By JavaScript

thanks in Advance

推荐答案

这应该有效
This should work
<script type="text/javascript">
  document.write("<p>JavaScript is enabled.</p>");
  // whatever code you need to do with Javascript.
</script>

<noscript>
  JavaScript is not enabled or not supported.
  <!-- whatever markup you want to display if scripting is disabled/unavailable -->
</noscript>


在页面末尾,在添加以下代码以检测javascript之前,
At the end of the page,before add following code to detect javascript,
<noscript>
        <div class="n1">
        </div>
        <div class="n2">
            <center>
                <span class="hlight">Enable javascript in your browser to work in this site.</span>
            </center>
        </div>
    </noscript>


这两种解决方案都是了解Java脚本的正确方法,因此无需赘述.

但是启用是不可能的.您只能请求或可以指导如何在其浏览器中启用JavaScript,但您不能通过代码自行启用.
Both solution is right to know about java-script so no need to talk about that.

But in mater of enable that is not possible. u can just request or can guide how to enable JavaScript in their browser but u can not enable it by ur self through code.


这篇关于验证是否启用了Javascipt的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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