Enum OpenAs
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
เปิดเป็น
อาร์เรย์แบบจำกัดที่ระบุวิธีเปิด URL
ลูกค้าสามารถเปิด URL เป็นหน้าต่างขนาดเต็ม (หากเป็นเฟรมที่ลูกค้าใช้) หรือวางซ้อน (เช่น ป๊อปอัป) การใช้งานจะขึ้นอยู่กับความสามารถของแพลตฟอร์มไคลเอ็นต์ และระบบอาจไม่สนใจค่าที่เลือกหากไคลเอ็นต์ไม่รองรับ ไคลเอ็นต์ทั้งหมดรองรับ FULL_SIZE
การใช้ OnClose
อาจทําให้ระบบละเว้น OpenAs
หากแพลตฟอร์มไคลเอ็นต์ไม่รองรับทั้ง 2 ค่าที่เลือกไว้ OnClose
จะมีความสําคัญเหนือกว่า
หากต้องการเรียกใช้ enum ให้เรียกคลาสหลัก ชื่อ และพร็อพเพอร์ตี้ของ enum นั้น เช่น
CardService.OpenAs.FULL_SIZE
พร็อพเพอร์ตี้
พร็อพเพอร์ตี้ | ประเภท | คำอธิบาย |
FULL_SIZE | Enum | เปิดในหน้าต่างหรือแท็บแบบเต็ม ค่าเริ่มต้น |
OVERLAY | Enum | เปิดเป็นการวางซ้อน เช่น ป๊อปอัป |
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-07-26 UTC
[null,null,["อัปเดตล่าสุด 2025-07-26 UTC"],[[["\u003cp\u003e\u003ccode\u003eOpenAs\u003c/code\u003e is an enum used to specify how a URL should be opened by the client, either as a full-size window or an overlay.\u003c/p\u003e\n"],["\u003cp\u003eWhile \u003ccode\u003eFULL_SIZE\u003c/code\u003e is supported by all clients, \u003ccode\u003eOVERLAY\u003c/code\u003e support depends on the client platform and might be ignored.\u003c/p\u003e\n"],["\u003cp\u003eUsing \u003ccode\u003eOnClose\u003c/code\u003e may take precedence over \u003ccode\u003eOpenAs\u003c/code\u003e, potentially causing the chosen opening method to be disregarded if the client platform has limitations.\u003c/p\u003e\n"],["\u003cp\u003eTo utilize this enum in your code, use the syntax: \u003ccode\u003eCardService.OpenAs.FULL_SIZE\u003c/code\u003e or \u003ccode\u003eCardService.OpenAs.OVERLAY\u003c/code\u003e.\u003c/p\u003e\n"]]],[],null,["# Enum OpenAs\n\nOpenAs\n\nAn enum that specifies how to open a URL.\n\nThe client can open a URL as either a full size window (if that is the frame used by the\nclient), or an overlay (such as a pop-up). The implementation depends on the client platform\ncapabilities, and the value selected may be ignored if the client does not support it. `FULL_SIZE` is supported by all clients.\n\nUsing [OnClose](/apps-script/reference/card-service/on-close) may cause [OpenAs](#) to be ignored; if the client platform cannot\nsupport both selected values together, [OnClose](/apps-script/reference/card-service/on-close) takes precedence.\n\nTo call an enum, you call its parent class, name, and property. For example, `\nCardService.OpenAs.FULL_SIZE`. \n\n### Properties\n\n| Property | Type | Description |\n|-------------|--------|----------------------------------------|\n| `FULL_SIZE` | `Enum` | Open in a full window or tab. Default. |\n| `OVERLAY` | `Enum` | Open as an overlay such as a pop-up. |"]]