- Learning Google Apps Script
- Ramalingam Ganapathy
- 68字
- 2021-07-16 12:40:04
Creating a modal dialog
To create a modal dialog, which prevents the user from updating anything in the spreadsheet or document, update the code in the Code.gs
file as shown here:
function onOpen(){ DocumentApp.getUi() .createAddonMenu() .addItem("Show Dialog", "showDialog") .addToUi(); } function showDialog() { var html = HtmlService .createHtmlOutputFromFile('Index'); DocumentApp.getUi() .showModalDialog(html, 'Greeting'); }
Go to Add-ons | Chapter 2 | Show Dialog and a modal dialog will pop up:

推薦閱讀
- JavaScript修煉之道
- Java異步編程實戰
- Learning Docker
- Python Deep Learning
- 樂高機器人設計技巧:EV3結構設計與編程指導
- Python貝葉斯分析(第2版)
- Learning Modular Java Programming
- Deep Learning with R Cookbook
- 網絡數據采集技術:Java網絡爬蟲實戰
- Learning Nessus for Penetration Testing
- Learning Image Processing with OpenCV
- Python面試通關寶典
- Beginning C# 7 Hands-On:The Core Language
- C語言程序設計實驗指導與習題精解
- Web前端開發精品課:HTML5 Canvas開發詳解