Javascript在浏览器中禁用问题 [英] Javascript disable issue in Browser

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

问题描述

您好,



我的网站上有javascript disable指南页面,其中介绍了如何在浏览器中启用javascript。当用户进入网站主页并且如果在浏览器中禁用了javascript,那么它将重定向到javascript禁用指南页面。



我在浏览器中检查JS禁用,如下面的代码:



< noscript>

< meta http-equiv =refreshcontent =1; URL = errjscript.aspx />

< / noscript>



但是当我打开我的网站并且如果在浏览器中禁用了JS,则它不会重定向到javascript禁用指南页面。我调试它,但每次重新加载主页面。



在我的所有其他网站中,我有相同的代码,它工作正常。



进一步改变我的web.config。我评论下面的代码。



< authentication mode =Forms>

< forms loginUrl =Default.aspx timeout =600protection =All/>





然后它在本地运行正常但不能在实时服务器上运行并给出401错误。



谢谢。

Hello,

I have javascript disable guideline page in my website which describes how to enable javascript in browser. when user go to site main page and if javascript is disabled in browser then it will redirect to javascript disable guideline page.

I am checking JS disable in browser like below code:

<noscript>
<meta http-equiv="refresh" content="1;URL=errjscript.aspx" />
</noscript>

but when I open my site and if JS is disabled in browser then it is not redirecting to javascript disable guideline page. I debug it but every time it is reloading main page.

In my all other sites, I have same code and it is working fine.

further I change my web.config. I commented below code in it.

<authentication mode="Forms">
<forms loginUrl="Default.aspx" timeout="600" protection="All"/>


then it works properly in local but not working on live server and giving 401 error.

Thanks.

推荐答案

理想的方法应该是显示指南消息或 noscript 标记内的内容。



401未经授权的访问错误。因此,我怀疑您尝试重定向到的指南文件不允许被应用程序或用户访问。
The ideal way to do this should be showing the guideline message or something just inside the noscript tags.

401 error comes for unauthorised access. So, I suspect the guideline file you are trying to redirect to is not permitted to be accessed by the application or user.


这篇关于Javascript在浏览器中禁用问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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