\n not working in google apps script Browser.msgBox

前端 未结 2 1277
一整个雨季
一整个雨季 2021-02-12 15:49

I am trying the following to add line breaks to a message box but it is not working.

function showMsgBox(){
  var msg = \'name: \\n \\n \\n Doc URL\';
  Browser.         


        
2条回答
  •  一向
    一向 (楼主)
    2021-02-12 15:55

    You need to double-escape "\n" for historical reasons

    function myFunction() {
      Browser.msgBox("Hello\\nWorld")
    }
    

提交回复
热议问题