protected void btnAdd_Click(object sender, EventArgs e) { if (txtValues.Text.Trim().Equals("")) { ClientScript.RegisterStartupScript(GetType(), "err", "alert('请输入内容');", true); } else { JavaDLL dll = new JavaDLL(); if (dll.addQuotations(txtValues.Text.Trim(), chkTip.Checked)) { ClientScript.RegisterStartupScript(GetType(), "err", "top.closeDialog()", true); } else { ClientScript.RegisterStartupScript(GetType(), "err", "alert('添加失败!');", true); } } }