ui.Label.setUrl
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
ตั้งค่า URL ของป้ายกำกับ ซึ่งจะทำให้แสดงเป็นลิงก์
แสดงผลป้ายกำกับนี้
การใช้งาน | การคืนสินค้า |
---|
Label.setUrl(targetUrl) | ui.Label |
อาร์กิวเมนต์ | ประเภท | รายละเอียด |
---|
ดังนี้ ui.label | ui.Label | อินสแตนซ์ ui.Label |
targetUrl | สตริง | URL ของไฮเปอร์ลิงก์ |
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-07-26 UTC
[null,null,["อัปเดตล่าสุด 2025-07-26 UTC"],[[["\u003cp\u003e\u003ccode\u003eLabel.setUrl()\u003c/code\u003e configures a label to act as a hyperlink by setting its URL.\u003c/p\u003e\n"],["\u003cp\u003eIt takes the target URL as an argument and applies it to the specified ui.Label instance.\u003c/p\u003e\n"],["\u003cp\u003eCalling \u003ccode\u003esetUrl()\u003c/code\u003e also returns the ui.Label object, allowing for method chaining.\u003c/p\u003e\n"]]],[],null,["# ui.Label.setUrl\n\n\u003cbr /\u003e\n\nSets the url of the label, which will cause it to render as a link.\n\n\u003cbr /\u003e\n\nReturns this label.\n\n| Usage | Returns |\n|---------------------------|----------|\n| Label.setUrl`(targetUrl)` | ui.Label |\n\n| Argument | Type | Details |\n|------------------|----------|---------------------------|\n| this: `ui.label` | ui.Label | The ui.Label instance. |\n| `targetUrl` | String | The url of the hyperlink. |"]]