แบบสำรวจการวิจัย: บอกให้เราทราบเกี่ยวกับประสบการณ์การใช้งาน Blockly
เริ่มแบบสำรวจ
blockly > อินพุต > removeField
นําช่องออกจากอินพุตนี้
ลายเซ็น:
removeField(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-08-22 UTC
[null,null,["อัปเดตล่าสุด 2024-08-22 UTC"],[[["The `removeField()` method removes a field, specified by its name, from a Blockly input."],["This method returns `true` if the field is successfully removed or `false` if the field is not found and the `opt_quiet` parameter is set to `true`."],["If the field is not present and the `opt_quiet` parameter is set to `false`, an error is thrown."]]],["The `Input.removeField()` method removes a field from an input. It accepts the field's name (string) as a required parameter and an optional boolean (`opt_quiet`). If `opt_quiet` is false and the field is missing, it throws an error; otherwise, it returns `false`. If the operation succeeds it will return `true`. The method returns a boolean indicating the success or failure of the removal.\n"]]