ui.util.setTimeout
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
เรียกใช้ฟังก์ชันหลังจากผ่านไประยะเวลาหนึ่ง
แสดงผลคีย์ที่ส่งไปยัง ui.util.clearTimeout เพื่อนำการหมดเวลาออกได้
การใช้งาน | การคืนสินค้า |
---|
ui.util.setTimeout(func, delay) | ตัวเลข |
อาร์กิวเมนต์ | ประเภท | รายละเอียด |
---|
func | ฟังก์ชัน | ฟังก์ชันที่จะเรียกใช้ในช่วงเวลาที่ระบุ |
delay | ตัวเลข | เวลาในหน่วยมิลลิวินาที (1/1000 ของวินาที) ที่ควรกำหนดให้ตัวจับเวลาหน่วงก่อนที่จะเรียกใช้ฟังก์ชันที่ระบุ |
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-07-26 UTC
[null,null,["อัปเดตล่าสุด 2025-07-26 UTC"],[[["\u003cp\u003e\u003ccode\u003eui.util.setTimeout\u003c/code\u003e executes a provided function after a specified delay.\u003c/p\u003e\n"],["\u003cp\u003eIt returns a unique key that can be used with \u003ccode\u003eui.util.clearTimeout\u003c/code\u003e to cancel the scheduled execution.\u003c/p\u003e\n"],["\u003cp\u003eThe delay is defined in milliseconds, controlling the time before the function is triggered.\u003c/p\u003e\n"]]],[],null,["# ui.util.setTimeout\n\n\u003cbr /\u003e\n\nCalls a function after a fixed time delay.\n\n\u003cbr /\u003e\n\nReturns a key that can be passed to ui.util.clearTimeout to remove the timeout.\n\n| Usage | Returns |\n|-----------------------------------|---------|\n| `ui.util.setTimeout(func, delay)` | Number |\n\n| Argument | Type | Details |\n|----------|----------|-------------------------------------------------------------------------------------------------------------------------|\n| `func` | Function | The function to run at the specified interval. |\n| `delay` | Number | The time, in milliseconds (thousandths of a second), the timer should delay before execution of the specified function. |"]]