protected void btnAdd_Click(object sender, EventArgs e) { if (txtTitle.Text.Trim().Equals("")) { ClientScript.RegisterStartupScript(GetType(), "err", "alert('请输入标题');", true); return; } JavaDLL dll = new JavaDLL(); if (dll.addVideo(txtTitle.Text.Trim(), txtUrl.Text.Trim(), txtUrl2.Text.Trim())) { ClientScript.RegisterStartupScript(GetType(), "err", "top.closeDialog()", true); } else { ClientScript.RegisterStartupScript(GetType(), "err", "alert('添加失败!');", true); } }