संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
बटन
यह एक ऐसा एनम है जो पहले से तय किए गए, स्थानीय भाषा में मौजूद डायलॉग बटन दिखाता है. ये बटन, alert या PromptResponse.getSelectedButton() से दिखाए जाते हैं. इससे यह पता चलता है कि उपयोगकर्ता ने डायलॉग में किस बटन पर क्लिक किया है. इन वैल्यू को सेट नहीं किया जा सकता. alert या prompt में बटन जोड़ने के लिए, ButtonSet का इस्तेमाल करें.
किसी एनम को कॉल करने के लिए, उसकी पैरंट क्लास, नाम, और प्रॉपर्टी को कॉल किया जाता है. उदाहरण के लिए,
Base.Button.CLOSE.
// Display a dialog box with a message and "Yes" and "No" buttons.constui=DocumentApp.getUi();constresponse=ui.alert('Are you sure you want to continue?',ui.ButtonSet.YES_NO,);// Process the user's response.if(response===ui.Button.YES){Logger.log('The user clicked "Yes."');}else{Logger.log('The user clicked "No" or the dialog\'s close button.');}
प्रॉपर्टी
प्रॉपर्टी
टाइप
ब्यौरा
CLOSE
Enum
हर डायलॉग के टाइटल बार में दिखने वाला स्टैंडर्ड बटन. इस बटन को डायलॉग में साफ़ तौर पर नहीं जोड़ा जाता और इसे हटाया नहीं जा सकता.
OK
Enum
"ठीक है" बटन, जिससे पता चलता है कि कोई कार्रवाई शुरू की जानी चाहिए.
CANCEL
Enum
"रद्द करें" बटन, जिससे पता चलता है कि कोई कार्रवाई नहीं की जानी चाहिए.
YES
Enum
"हां" बटन, जो किसी सवाल के लिए हां में जवाब देता है.
NO
Enum
"नहीं" बटन, जो किसी सवाल के लिए 'नहीं' का जवाब दिखाता है.
[[["समझने में आसान है","easyToUnderstand","thumb-up"],["मेरी समस्या हल हो गई","solvedMyProblem","thumb-up"],["अन्य","otherUp","thumb-up"]],[["वह जानकारी मौजूद नहीं है जो मुझे चाहिए","missingTheInformationINeed","thumb-down"],["बहुत मुश्किल है / बहुत सारे चरण हैं","tooComplicatedTooManySteps","thumb-down"],["पुराना","outOfDate","thumb-down"],["अनुवाद से जुड़ी समस्या","translationIssue","thumb-down"],["सैंपल / कोड से जुड़ी समस्या","samplesCodeIssue","thumb-down"],["अन्य","otherDown","thumb-down"]],["आखिरी बार 2025-07-26 (UTC) को अपडेट किया गया."],[[["\u003cp\u003e\u003ccode\u003eButton\u003c/code\u003e is an enum representing localized dialog buttons returned by alerts or prompts, indicating user action.\u003c/p\u003e\n"],["\u003cp\u003eThese predetermined button values (\u003ccode\u003eCLOSE\u003c/code\u003e, \u003ccode\u003eOK\u003c/code\u003e, \u003ccode\u003eCANCEL\u003c/code\u003e, \u003ccode\u003eYES\u003c/code\u003e, \u003ccode\u003eNO\u003c/code\u003e) cannot be set directly but are accessed via \u003ccode\u003eui.Button\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eTo add buttons to alerts or prompts, use \u003ccode\u003eButtonSet\u003c/code\u003e instead of individual \u003ccode\u003eButton\u003c/code\u003e values.\u003c/p\u003e\n"],["\u003cp\u003eThe provided example code demonstrates using \u003ccode\u003eButton\u003c/code\u003e to handle user responses from a dialog.\u003c/p\u003e\n"]]],[],null,[]]