gpt4 book ai didi

c# - 为什么我的警报没有弹出? ASP.NET C#

转载 作者:行者123 更新时间:2023-11-28 19:55:29 25 4
gpt4 key购买 nike

我的警报没有弹出。当我使用断点进行调试时,会执行此行

Response.Write("<script>alert('" + " We don't seem to have this user registered. Please try again " + "') ; location.href='Login.aspx'</script>");

最佳答案

don't 需要转义。

这可以按如下方式完成:

Response.Write("<script>alert('" + " We don\\'t seem to have this user registered. Please try again " + "') ; location.href='Login.aspx'</script>");

它现在应该会弹出。

关于c# - 为什么我的警报没有弹出? ASP.NET C#,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22651497/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com