0
好的,我發現如何使用消息框。消息框作爲安全選項(類似於「你確定要刪除」嗎?)GAS
Browser.msgBox('Execute function(experimental)', 'Do you really want to proceed?', Browser.Buttons.YES_NO);
如果我想在用戶按下「否」時中止功能,我必須添加什麼。 ?
好的,我發現如何使用消息框。消息框作爲安全選項(類似於「你確定要刪除」嗎?)GAS
Browser.msgBox('Execute function(experimental)', 'Do you really want to proceed?', Browser.Buttons.YES_NO);
如果我想在用戶按下「否」時中止功能,我必須添加什麼。 ?
msgBox(title, prompt, buttons)。返回:字符串 - 用戶點擊的按鈕的小寫文本。
實施例:
function testMsgBox() {
var _button = Browser.msgBox('Execute function(experimental)', 'Do you really want to proceed?', Browser.Buttons.YES_NO);
if (_button === 'yes')
//TODO 'yes'
else
//TODO 'no'
}