try it:\nalert('hello\nhello');

解决方案 »

  1.   

    <html>
    <head>
    </head>
    <body>
    <input type="button" value="Click me!" onClick="javascript:alert('hello \nhello');">
    </body>
    </html>
      

  2.   

    1、\\:反斜杠。
    2、\n:换行符,用来表示重起一行。
    3、\t:水平制表符。
    4、\b:退格符。
    5、\r:回车符。
    6、\f:进纸符。
    7、\':单引号。
    8、\":双引号。
      

  3.   

    <html>
    <head>
    </head>
    <body>
    <input type="button" value="Click me!" onClick="javascript:alert('hello \nhello');">
    </body>
    </html>完全可以
      

  4.   

    string str=@"<script>alert('hello\nhello');</script>";
    Response.Write(str);
      

  5.   

    在<script language=vb runat=server></script>
    如何实现这样的窗口?
      

  6.   

    <script language="javascript">
    function message()
    {
         window.alert("123\n\r456");
    }
    </script>
      

  7.   

    alert("Warning\r\nnext row");