求助大佬空白处如何填,课堂题目,但是自己是自学java😭
第一空填用respone控件,或直接抛出JavaScript百度一下吧。
第二空填
textbox1.value=“”;textbox2.value=“”
1、Response.Write("<script>window.alert('登录成功!')</script>");
2、this.TextBox1.Text = "";this.TextBox2.Text = "";
您好,
第一个空应使用ScriptManager.RegisterStartupScript 调用 javascript alert 方法.
protected void Button1_Click(object sender, EventArgs e)
{
ScriptManager.RegisterStartupScript(Page, Page.GetType(), "SomestartupScript", "alert('登录成功');", true);
}
第二个空如上面的回答所示
protected void Button2_Click(object sender, EventArgs e)
{
TextBox1.Text = "";TextBox2.Text = "";
}