windows.onload()
弹出窗口未在Chrome中显示整个消息。在资源管理器中,弹出窗口显示完整消息。如何在Chrome中解决此问题?
string script = "window.onload = function() { alert('" + message + "'); };";
ClientScript.RegisterStartupScript(this.GetType(), "alert", script, true);
答案 0 :(得分:0)
protected void Page_load(object sender,EventArgs e)
{
string message="hii";
Response.Write("<script type='text/javascript'>alert('"+message+"');</script>");
}
尝试这个...