แบบสำรวจการวิจัย: บอกให้เราทราบเกี่ยวกับประสบการณ์การใช้งาน Blockly
เริ่มแบบสำรวจ
blockly > บล็อก > removeInput
นําอินพุตออกจากบล็อกนี้
ลายเซ็น:
removeInput(name: string, opt_quiet?: boolean): boolean;
พารามิเตอร์
พารามิเตอร์ |
ประเภท |
คำอธิบาย |
ชื่อ |
สตริง |
ชื่อของอินพุต |
opt_quiet |
boolean |
(ไม่บังคับ) True เพื่อป้องกันข้อผิดพลาดหากไม่มีอินพุต |
การคืนสินค้า:
boolean
"จริง" หากการดำเนินการสำเร็จ เท็จหากไม่มีอินพุตและ opt_quiet เป็น "จริง"
ข้อยกเว้น
{Error} หากไม่มีอินพุตและ opt_quiet ไม่เป็นจริง
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2024-11-08 UTC
[null,null,["อัปเดตล่าสุด 2024-11-08 UTC"],[[["The `removeInput()` method is used to delete an input from a Blockly block using the input's name."],["The method optionally takes a boolean, `opt_quiet`, to suppress errors if the specified input is not found."],["`removeInput()` returns `true` if the removal is successful, and `false` if `opt_quiet` is true and the input doesn't exist."],["An error is thrown if the input is not found and `opt_quiet` is not set to `true`."]]],["The `Block.removeInput()` method removes an input from a block using the input's name. It accepts two parameters: `name` (a string specifying the input's name) and an optional `opt_quiet` (a boolean). If `opt_quiet` is true, the method returns false if the input is absent. If `opt_quiet` is false (or omitted) and the input is not found, it throws an error. The method returns `true` if the input is successfully removed.\n"]]