。CS
protected void CheckBox1_CheckedChanged(object sender, EventArgs e)
{
StringBuilder str = new StringBuilder();
str.Append("<script language='javascript'>($('#phnoe').show();)</script>");
ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "chp", str.ToString(), true);
}
.aspx
<asp:CheckBox ID="ch_p" Text="phone" runat="server" AutoPostBack="true"
oncheckedchanged="CheckBox1_CheckedChanged"/>
</div><div id="p" style="float:left;"><asp:TextBox style="float: left;" runat="server" id="phnoe" Visible="false"></asp:TextBox></div></div><br />
output - on checkedchanged //]]> 出现在页面顶部