欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

Asp.Net alert彈出提示信息的幾種方法總結

 更新時間:2014年01月29日 10:07:06   作者:  
本篇文章主要是對Asp.Net alert彈出提示信息的幾種方法進行了總結介紹,需要的朋友可以過來參考下,希望對大家有所幫助

1.ClientScript.RegisterStartupScript(GetType(),"message","<script>alert('第一種方式,無白屏!');</script>");

2.HttpContext.Current.Response.Write("<script>alert('第二種方式,有白屏!')</script>");

3.public static void Show(System.Web.UI.Page page, string msg)
    {
        page.ClientScript.RegisterStartupScript(page.GetType(), "message", "<script language='javascript' defer>alert('" + msg.ToString() + "');</script>");
    }
Show(this, "第三種方式,無白屏,不變形!");

4.Response.Write("<script>alert('第四種方式,有白屏!')</script>");

5.window.showModalDialog('XXX.aspx', '', 'dialogWidth:429px;dialogHeight:200px;location:no,menubar:no,toolbar:no,status:no');

6.Page.clientscript.registerstartupscript(this.gettype(), "", "<script>window.open('../issue/issueallcomment.aspx');</script>");
即可解決.

7.
使用ajax組件的函數,如下:
System.Web.UI.ScriptManager.RegisterStartupScript(this, this.GetType(), "opennewwindow", "alert('彈出框內容!');", true);

8.
在頁面的body的最后一行放置一個控件,并在代碼頁里給這個控件賦值,如:

label.Text="<script>alert('彈出框內容!); </script> ";

相關文章

最新評論