如何在JavaScript警告框中添加新行?
\n将添加一个新行 - \n作为新行的控制代码。
\n
alert("Line 1\nLine 2");
2.1m questions
2.1m answers
60 comments
56.8k users