Javascript 使用应用程序脚本在onclick内调用函数
我怀疑在应用程序脚本服务器中有一些程序阻止onclick命令向函数传递值。这有什么办法吗? 以下是我得到的:Javascript 使用应用程序脚本在onclick内调用函数,javascript,html,function,email,google-apps-script,Javascript,Html,Function,Email,Google Apps Script,我怀疑在应用程序脚本服务器中有一些程序阻止onclick命令向函数传递值。这有什么办法吗? 以下是我得到的: function func() { var template = HtmlService.createHtmlOutputFromFile('buttons'); var content = (template.getContent()); Logger.log(content) MailApp.sendEmail({ to: 'ggg@gmail.co
function func() {
var template = HtmlService.createHtmlOutputFromFile('buttons');
var content = (template.getContent());
Logger.log(content)
MailApp.sendEmail({
to: 'ggg@gmail.com',
subject: 'subject',
htmlBody: content
});
}
答复:
试试下面的一个答案
试试看
试试看
试试看
试试看
函数f1(obj){
如果(obj.value=='ttt'){
document.getElementById(“myText”).value='Correct!';
}
否则{
document.getElementById(“myText”).value='错误答案..';
}
}
现代电子邮件客户端/服务不允许在电子邮件的HTML内容上使用AFAIK JavaScript,因为它存在安全风险
相关的