我的response.write("alert('成功')")总是显示在页面上端,而不是以弹出框的形式显示?

我的response.write("<script>alert('成功')</script>")总是显示在页面上端,而不是以弹出框的形式显示?

但是我另外的页面却可以。

困扰了很久,后来才发现,在response.write()前加上:context.Response.ContentType = "text/html";就可以了。


猜你喜欢

转载自blog.csdn.net/junhm/article/details/73250200