Response.Write("<script language=""javascript"">alert(""登录成功!"");</script>")==》Response.Write("<script>alert('登录成功!');</script>")

解决方案 »

  1.   

    Compilation Error 
    Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately. Compiler Error Message: BC30648: String constants must end with a double quote.Source Error: Line 6:   Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    Line 7:          '在此处放置初始化页的用户代码
    Line 8:         Response.Write("<script>alert('登录成功!');</script>")//此行为红色
    Line 9:      End Sub
    Line 10: 
     
      

  2.   

    <script language="javascript">
      alert('登录成功!');
    </script>
      

  3.   

    Response.Write("<script language='javascript'>alert('登录成功!');</script>");
      

  4.   

    1. don't use Response.Write, use Page.RegisterStartupScript2. but if you insist, tryResponse.Write("<script>alert('登录成功!');</" & "script>")
      

  5.   

    有没有搞错啊,这句一点错都没有:Response.Write("<script>alert('登录成功!');</script>")
      

  6.   


    Response.Write("<script language='javascript'>alert('登录成功!');</script>");
      

  7.   

    我试了思归的第二个方法,它可以有,第一个方法我没有试。
    还有下面这句,注释了都不行。
    Response.Write("<script language='javascript'>alert('登录成功!');</script>");