Page.RegisterStartupScript("error","<script>alert('错拉')</script>");

解决方案 »

  1.   

    Response.Write("<script language=javascript>alert('asdf');</script>");
      

  2.   

    vvbscript:
    function msg 
     if msgbox("Exit?",vbyesno,"Sure")=vbyes then
         window.parent.close
      end if
    end function
      

  3.   

    Button1.Attributes.Add("onclick","return confirm('你要干什么?')");
      

  4.   

    在ASP.NET语言中,没有这种交互机制,包括.NET框架在WEB页提供的
    验证控件提示对话框或消息框,其实都用script代码实现的.