c#如何在web上弹出消息框这个问题几乎每天都有人问
Response.Write("javascript:alert('hahahah!')");
或:
.Attributes.Add("onclike"," return confirm('are you sure?')");
----------------
Page.RegisterStartupScript(""," alert('添加数据成功!')");
----------------
现在知道了,只要Page.RegisterStartupScript("","...
这个问题几乎每天都有人问
Response.Write("javascript:alert('hahahah!')");
或:
.Attributes.Add("onclike"," return confirm('are you sure?')");
----------------
Page.RegisterStartupScript("","");
----------------
现在知道了,只要Page.RegisterStartupScript("","");中把alert改为confirm就行了。
----------------
麻烦一点你可以加引用System.Windows.Forms.dll
命名空间:using System.Windows.Forms.MessageBox;
之后使用MessageBox.Show();
具体你可以查一下MessageBox.Show
MessageBox.Show("You must enter a name.", "Name Entry Error", MessageBoxButtons.OK, MessageBoxIcon.Exclamation );
----------------
Button1.Attributes.Add("onclike"," return confirm('are you sure?')");
button.Attributes.Add("onclick", "return confirm('文本');");
----------------
Reponse.Write(""); ----------------
本文档为【c#如何在web上弹出消息框】,请使用软件OFFICE或WPS软件打开。作品中的文字与图均可以修改和编辑,
图片更改请在作品中右键图片并更换,文字修改请直接点击文字进行修改,也可以新增和删除文档中的内容。
该文档来自用户分享,如有侵权行为请发邮件ishare@vip.sina.com联系网站客服,我们会及时删除。
[版权声明] 本站所有资料为用户分享产生,若发现您的权利被侵害,请联系客服邮件isharekefu@iask.cn,我们尽快处理。
本作品所展示的图片、画像、字体、音乐的版权可能需版权方额外授权,请谨慎使用。
网站提供的党政主题相关内容(国旗、国徽、党徽..)目的在于配合国家政策宣传,仅限个人学习分享使用,禁止用于任何广告和商用目的。