怎么样用JavaScript的alert显示带换行的警告对话框
JavaScript的alert对话框如果需要换行的话可以在字符串中加入\n即可
<p>Click the button to demonstrate line-breaks in a popup box.</p>
<button>Try it</button>
<p id="demo"></p>
function myFunction()
{
alert("Hello\nHow are you?");
}
