如何使用 Google Apps 脚本换行?我用过"\n","
,"\r",但都无法实现换行。例如:
function submit(e) {
var app = UiApp.getActiveApplication();
var strMessage = "";
if (e.parameter.Eventtitle == "")
{
strMessage = "Event title mustn't be null!";
}
if (e.parameter.Fromdate == "")
{
strMessage = strMessage + "\n" + "<br>" + "From date mustn't be null!";
}
if (e.parameter.Where == "")
{
strMessage = strMessage + "%s\n" + "Where mustn't be null!";
}
if (e.parameter.Description == "")
{
strMessage = strMessage + "\r\n" + "Description mustn't be null!";
}
if (strMessage != "")
{
var messageLabel = app.getElementById("message").setText(strMessage);
messageLabel.setVisible(true);
return app;
}