所有分頁類型的列舉。
如要呼叫列舉,您可以呼叫其父項類別、名稱和屬性。例如
DocumentApp.TabType.TAB
。
使用 TabType
列舉檢查特定元素的類型,例如:
var tab = DocumentApp.getActiveDocument().getActiveTab(); // Use getType() to determine the tab's type before casting. if (tab.getType() == DocumentApp.TabType.DOCUMENT_TAB) { // It's a document tab, write some text to it. tab.asDocumentTab().setText('Hello World!'); } else { // There are currently no types other than DOCUMENT_TAB. }
屬性
屬性 | 類型 | 說明 |
---|---|---|
DOCUMENT_TAB | Enum | 與 DocumentTab 對應的類型。 |