ASP.NET入门 - 简单计算器
2023-12-19 01:49:56    43    0    0
admin

protected void Button1_Click(object sender, EventArgs e)
{
try
{
double a, b, c;
a = Convert.ToDouble(TextBox1.Text);
b = Convert.ToDouble(TextBox2.Text);
c = a + b;
Response.Write("<script>alert('" + c.ToString() + "')</script>");
}catch(Exception ex)
{
Response.Write("<script>alert('" + ex.Message + "')</script>");
}
}

Pre: ASP.NET入门 - JsHelper类

Next: QT - 打包exe

43

ICP备案号: 赣ICP备2020012703号-1

表格内容