C# 代码 设置 前台 页面 JS提示

Posted 哈哈哈

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了C# 代码 设置 前台 页面 JS提示相关的知识,希望对你有一定的参考价值。

方法1:

Page.ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert(‘添加成功!‘);</script>");

方法2:(已经过时)

public void Alert(String warning)
    {
        Page.RegisterStartupScript("hint","<script defer=‘defer‘>window.alert(‘" + warning + "‘)</script>");
}

以上是关于C# 代码 设置 前台 页面 JS提示的主要内容,如果未能解决你的问题,请参考以下文章