我Index.aspx
有我有这个:
<iframe id="dyna" src="~/Home.aspx" runat="server" onload="dyna_Load" frameborder="0" scrolling="auto" style="border:none" ></iframe>
和里面Index.aspx.cs
:
protected void dyna_Load(object sender, EventArgs e)
{
Page.ClientScript.RegisterStartupScript(this.GetType(), "illumez", "alert('test')", true);
}
RegisterClientScriptBlock / RegisterStartupScript
正在调用,但 javascript 没有被执行!这里做错了什么?