ee.List.getInfo
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
ดึงค่าของออบเจ็กต์นี้จากเซิร์ฟเวอร์
หากไม่ได้ระบุฟังก์ชันการเรียกกลับ ระบบจะส่งคำขอแบบพร้อมกัน หากมีการระบุการเรียกกลับ ระบบจะส่งคำขอแบบไม่พร้อมกัน
เราขอแนะนำให้ใช้โหมดอะซิงโครนัสเนื่องจากโหมดซิงโครนัสจะหยุดโค้ดอื่นๆ ทั้งหมด (เช่น UI ของเครื่องมือแก้ไขโค้ด EE) ขณะรอเซิร์ฟเวอร์ หากต้องการส่งคำขอแบบอะซิงโครนัส เราขอแนะนำให้ใช้ evaluate() แทน getInfo()
แสดงผลค่าที่คำนวณแล้วของออบเจ็กต์นี้
การใช้งาน | การคืนสินค้า |
---|
List.getInfo(callback) | วัตถุ |
อาร์กิวเมนต์ | ประเภท | รายละเอียด |
---|
ดังนี้ computedobject | ComputedObject | อินสแตนซ์ ComputedObject |
callback | ฟังก์ชัน (ไม่บังคับ) | การเรียกกลับที่ไม่บังคับ หากไม่ได้ระบุไว้ ระบบจะโทรแบบพร้อมกัน |
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-07-26 UTC
[null,null,["อัปเดตล่าสุด 2025-07-26 UTC"],[[["\u003cp\u003eRetrieves the object's computed value, either synchronously or asynchronously, from the server.\u003c/p\u003e\n"],["\u003cp\u003eAsynchronous requests, preferred to avoid UI blocking, are made using \u003ccode\u003eevaluate()\u003c/code\u003e or by providing a callback function to \u003ccode\u003egetInfo()\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003egetInfo()\u003c/code\u003e returns the computed value as an object when called with an optional callback.\u003c/p\u003e\n"]]],["The `getInfo()` method retrieves an object's value from the server. It can operate synchronously or asynchronously. If no callback function is provided, the request is synchronous, halting other code execution. If a callback is provided, it runs asynchronously, which is the preferred method. `getInfo()` returns the object's computed value. The asynchronous method is preferred and can be used with the method `evaluate()`.\n"],null,["# ee.List.getInfo\n\n\u003cbr /\u003e\n\nRetrieves the value of this object from the server.\n\n\u003cbr /\u003e\n\nIf no callback function is provided, the request is made synchronously. If a callback is provided, the request is made asynchronously.\n\nThe asynchronous mode is preferred because the synchronous mode stops all other code (for example, the EE Code Editor UI) while waiting for the server. To make an asynchronous request, evaluate() is preferred over getInfo().\n\nReturns the computed value of this object.\n\n| Usage | Returns |\n|------------------------------|---------|\n| List.getInfo`(`*callback*`)` | Object |\n\n| Argument | Type | Details |\n|------------------------|--------------------|------------------------------------------------------------------------|\n| this: `computedobject` | ComputedObject | The ComputedObject instance. |\n| `callback` | Function, optional | An optional callback. If not supplied, the call is made synchronously. |"]]