js中confirm或者alert不识别标签,所以要换行的话可以采用下面方式 \u000d 或者 \r:
<script> ???var res=confirm(\"这是测试工作: \u000d第二行】, \u000d警告! \u000d警告!消灭!\"); ???if(!res){ ???????window.history.go(-1); ???}</script> ???
js confirm实现换行
原文地址:https://www.cnblogs.com/wxdblog/p/8405151.html