62,074
社区成员
发帖
与我相关
我的任务
分享
if (string.IsNullOrWhiteSpace(TextBox1.Text))
{
MessageBox Msg = new MessageBox();
Msg.MsgBox11("真的不打算注册邮箱吗?,不注册邮箱将在丢失的密码的情况下找不回密码");
TextBox6.Text = HiddenField1.Value;
}[oode]
在类messagebox中进行与js的交互[code=html] public void MsgBox11(string _msg)
{
string js;
js = "<script language=javascript>";
js += "var t=window.confirm('"+_msg +"');";
js += "document.getElementById(‘HiddenField1’).value=t;";
js += "</script>";
System.Web.HttpContext.Current.Response.Write(js);
}