带链接的消息框 [英] Message Box with link
本文介绍了带链接的消息框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试在带有文本和clickable hyperlink
的Google表格中popup a message box
.
I am trying to popup a message box
in a Google Sheet with a text and clickable hyperlink
.
到目前为止,我的搜索产生了已弃用的ui函数.
My searches so far yielded deprecated ui-functions.
推荐答案
function msgBoxWithLink(msg,link,desc) {
var link=link || 'http://jimesteban.com';
var desc=desc || 'Description';
var msg=msg || 'Link';
var html=Utilities.formatString('<style>input{margin: 5px 0;}</style><h3>%s</h3><a href="%s" target="_blank">%s</a><br /><input type="button" value="Close" onClick="google.script.host.close();" />',msg,link,desc);
var userInterface=HtmlService.createHtmlOutput(html);
SpreadsheetApp.getUi().showModelessDialog(userInterface, "Message Box with Link");
}
这篇关于带链接的消息框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文