DropDownList的SelectedIndexChanged事件中如何调用这段Js代码??
Js代码如下:
function Sum()
{
document.getElementById( "TextBox3 ").value=Number(document.getElementById( "TextBox2 ").value)+Number(document.getElementById( "TextBox1 ").value);
}
事件:
protected void ddlcSaleMode_SelectedIndexChanged(object sender, EventArgs e)
{
//这里面该怎么写???调用Sum()
}
------解决方案--------------------ClientScript.RegisterStartupScript(this.GetType(), " ", " <script> Sum() </script> ");
------解决方案--------------------Response.write( " <script> Sum(); </script> ");