Ajax.net 但没有脚本

发布于 2024-07-17 14:36:03 字数 247 浏览 4 评论 0原文

我想使用ajax.net做一些js。 如下所示:

ScriptManager.RegisterStartupScript(Submit, typeof(Button), "alert", "location.href='test.aspx';", true);

如果用户关闭 JavaScript,它将不会重定向到另一个页面。

我想知道如何设置

多谢!!

I want use ajax.net to do some js. like below:

ScriptManager.RegisterStartupScript(Submit, typeof(Button), "alert", "location.href='test.aspx';", true);

If user turn off the javascript, it will not redirect to another page.

I want to know how to set <noscript></noscript>.

Thanks a lot!!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

眼角的笑意。 2024-07-24 14:36:03

这里:

<noscript>
  <meta http-equiv="refresh" content="0; URL='no-script.aspx'">
</noscript>

Here:

<noscript>
  <meta http-equiv="refresh" content="0; URL='no-script.aspx'">
</noscript>
战皆罪 2024-07-24 14:36:03

我会使用 Response.Redirect("test.aspx") ,它不需要 JavaScript,并且应该受到大多数现代浏览器的支持。

I would use Response.Redirect("test.aspx") which does not require JavaScript and should be supported by most of the modern browsers.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文