- C# code
Response.Write("<script>alert('"+ 1 + "<br>" + 2 + "<br>" + 3 +"')</script>");
效果
http://img.my.csdn.net/uploads/201210/25/1351143008_9814.jpg
应该怎样实现
------解决方案--------------------------------------------------------
Refer:
- C# code
string s = @"+ 1 + \n\r + 2 + \n\r + 3 +"; Response.Write("<scr" + "ipt>alert('" + s + "')</scr" + "ipt>");
------解决方案--------------------------------------------------------
Response.Write("<script>alert(\"1\\r\\n2\")</script>");