简体   繁体   English

禁用Javascript的ASP.NET

[英]ASP.NET with Javascript disabled

As you probably know, ASP.NET injects some javascript code to the form, like so: 您可能知道,ASP.NET会向表单注入一些javascript代码,如下所示:

<script type="text/javascript">
//<![CDATA[
var theForm = document.forms['aspnetForm'];
if (!theForm) {
    theForm = document.aspnetForm;
}
function __doPostBack(eventTarget, eventArgument) {
    if (!theForm.onsubmit || (theForm.onsubmit() != false)) {
        theForm.__EVENTTARGET.value = eventTarget;
        theForm.__EVENTARGUMENT.value = eventArgument;
        theForm.submit();
    }
}
//]]>
</script>

Now, the problem with this is that if I turn Javascript off (using WebDev toolbar in FF), I get 现在,问题是,如果我关闭Javascript(使用FF中的WebDev工具栏),我得到

"Browser does not support script" at the top of the page. 页面顶部的“浏览器不支持脚本”。

Does anyone know how I can set this tag, for this bit of auto-injected js? 对于这段自动注入的js,有谁知道如何设置这个标签?

Thanks Duncan 谢谢邓肯

This is not a notification from asp.net. 不是来自asp.net的通知。 Are you sure there are no <noscript> blocks on your website? 您确定您的网站上没有<noscript>块吗?

Perhaps you are using some third party menu component? 也许你正在使用一些第三方菜单组件?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM