日期:2014-05-16 浏览次数:20400 次
Quote: 引用: 贴代码 protected void Button1_Click(object sender, EventArgs e) { //判断用户是否选择了答案。如果没有做出选择,将会弹出对话框,提示用户做出选择 if (RadioButton1.Checked == false ------解决方案-------------------- RadioButton2.Checked == false ------解决方案-------------------- RadioButton3.Checked == false ------解决方案-------------------- RadioButton4.Checked == false) { Response.Write("<script>alert('请选择答案');</script>"); } else if (RadioButton3.Checked == true) { Response.Write("<script>alert('正确答案为C,恭喜你答对了!');</script>"); } else { Response.Write("<script>alert('正确答案为C,对不起你答错了');</script>"); } }
贴代码
protected void Button1_Click(object sender, EventArgs e) { //判断用户是否选择了答案。如果没有做出选择,将会弹出对话框,提示用户做出选择 if (RadioButton1.Checked == false ------解决方案-------------------- RadioButton2.Checked == false ------解决方案-------------------- RadioButton3.Checked == false ------解决方案-------------------- RadioButton4.Checked == false) { Response.Write("<script>alert('请选择答案');</script>"); } else if (RadioButton3.Checked == true) { Response.Write("<script>alert('正确答案为C,恭喜你答对了!');</script>"); } else { Response.Write("<script>alert('正确答案为C,对不起你答错了');</script>"); } }
Response.Write("<script>alert('请选择答案');</script>");