Class HtmlOutputMetaTag
संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
HtmlOutputMetaTag
ऐसा ऑब्जेक्ट जो HtmlOutput.addMetaTag(name, content)
को कॉल करके, पेज में जोड़े गए मेटा टैग को दिखाता है.
const output = HtmlService.createHtmlOutput('<b>Hello, world!</b>');
output.addMetaTag('viewport', 'width=device-width, initial-scale=1');
const tags = output.getMetaTags();
Logger.log(
'<meta name="%s" content="%s"/>',
tags[0].getName(),
tags[0].getContent(),
);
तरीके
तरीका | रिटर्न टाइप | संक्षिप्त विवरण |
getContent() | String | इस मेटा टैग का कॉन्टेंट पाता है. |
getName() | String | इस HtmlOutputMetaTag का नाम दिखाता है. |
ज़्यादा जानकारी वाला दस्तावेज़
getContent()
इस मेटा टैग का कॉन्टेंट पाता है.
वापसी का टिकट
String
— इस मेटा टैग का कॉन्टेंट.
getName()
इस HtmlOutputMetaTag
का नाम दिखाता है.
वापसी का टिकट
String
— इस मेटा टैग का नाम.
जब तक कुछ अलग से न बताया जाए, तब तक इस पेज की सामग्री को Creative Commons Attribution 4.0 License के तहत और कोड के नमूनों को Apache 2.0 License के तहत लाइसेंस मिला है. ज़्यादा जानकारी के लिए, Google Developers साइट नीतियां देखें. Oracle और/या इससे जुड़ी हुई कंपनियों का, Java एक रजिस्टर किया हुआ ट्रेडमार्क है.
आखिरी बार 2025-07-26 (UTC) को अपडेट किया गया.
[null,null,["आखिरी बार 2025-07-26 (UTC) को अपडेट किया गया."],[[["\u003cp\u003e\u003ccode\u003eHtmlOutputMetaTag\u003c/code\u003e objects represent meta tags added to HTML pages using \u003ccode\u003eHtmlOutput.addMetaTag()\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThese objects allow you to access the name and content of the meta tag through \u003ccode\u003egetName()\u003c/code\u003e and \u003ccode\u003egetContent()\u003c/code\u003e methods.\u003c/p\u003e\n"],["\u003cp\u003eYou can retrieve all added meta tags using \u003ccode\u003eHtmlOutput.getMetaTags()\u003c/code\u003e and iterate through them.\u003c/p\u003e\n"]]],[],null,["# Class HtmlOutputMetaTag\n\nHtmlOutputMetaTag\n\nAn object that represents a meta tag added to the page by calling [HtmlOutput.addMetaTag(name, content)](/apps-script/reference/html/html-output#addMetaTag(String,String)).\n\n```javascript\nconst output = HtmlService.createHtmlOutput('\u003cb\u003eHello, world!\u003c/b\u003e');\noutput.addMetaTag('viewport', 'width=device-width, initial-scale=1');\n\nconst tags = output.getMetaTags();\nLogger.log(\n '\u003cmeta name=\"%s\" content=\"%s\"/\u003e',\n tags[0].getName(),\n tags[0].getContent(),\n);\n``` \n\n### Methods\n\n| Method | Return type | Brief description |\n|-------------------------------|-------------|--------------------------------------------------|\n| [getContent()](#getContent()) | `String` | Gets the content of this meta tag. |\n| [getName()](#getName()) | `String` | Gets the name of this `Html``Output``Meta``Tag`. |\n\nDetailed documentation\n----------------------\n\n### `get``Content()`\n\nGets the content of this meta tag.\n\n#### Return\n\n\n`String` --- the content of this meta tag.\n\n*** ** * ** ***\n\n### `get``Name()`\n\nGets the name of this `Html``Output``Meta``Tag`.\n\n#### Return\n\n\n`String` --- the name of this meta tag."]]