在服务器端写的两种方法
ClientScript.RegisterStartupScript(ClientScript.GetType(), "MyScript", "sayhello();", true);
这种写法在客户端写好sayhello函数然后调用Response.Write("<script>alert('hello!')");
这种写法直接写到客户端脚本两种写法显示消息的时候,后面屏幕都是白的,好像是因为页面还没有加载。要在服务器端调用alert,有什么办法可以避免这种情况?