getFootNotes()和警报:如何验证学生是否附加脚注?
我想在Google文档上验证是否添加了脚注。我的脚本不运行。
脚本:
function addNote () {
const menuMessage = DocumentApp.getUi();
const doc = DocumentApp.getActiveDocument();
const notePiedPage = doc.getFootnotes();
if(notePiedPage == DocumentApp.ElementType.FOOTNOTE){
menuMessage.alert('Génial, le 3e mot de passe est BISCOTO');
}
else {
menuMessage.alert('Erreur...');
}
}
I want to verify on google docs if students added a footnote. My scripts doesn't run.
script:
function addNote () {
const menuMessage = DocumentApp.getUi();
const doc = DocumentApp.getActiveDocument();
const notePiedPage = doc.getFootnotes();
if(notePiedPage == DocumentApp.ElementType.FOOTNOTE){
menuMessage.alert('Génial, le 3e mot de passe est BISCOTO');
}
else {
menuMessage.alert('Erreur...');
}
}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
看起来不正确:
因为getfootnotes()返回阵列
尝试这样的东西:
class footnote> class footnote
This looks incorrect:
because getFootnotes() returns an array
Try something like this:
Class Footnote