קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
blockly > FieldImage > setOnClickHandler
שיטת FieldImage.setOnClickHandler()
כאן מגדירים את הפונקציה שמופעלת כשלוחצים על התמונה הזו.
Signature:
setOnClickHandler(func: ((p1: FieldImage) => void) | null): void;
פרמטרים
פרמטר |
סוג |
תיאור |
func |
((p1: FieldImage) => cancel) | null |
הפונקציה שמופעלת כשמשתמש לוחץ על התמונה, או null כדי להסיר אותה. |
החזרות:
ריק
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 4.0 ודוגמאות הקוד הן ברישיון Apache 2.0. לפרטים, ניתן לעיין במדיניות האתר Google Developers. Java הוא סימן מסחרי רשום של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2025-07-25 (שעון UTC).
[null,null,["עדכון אחרון: 2025-07-25 (שעון UTC)."],[],["The `setOnClickHandler` method within the `FieldImage` class sets a function to be executed when an image is clicked. It accepts a single parameter, `func`, which can be a function taking a `FieldImage` object as input or `null` to remove any existing click handler. This method has no return value. The provided function is activated upon a user clicking the associated image within the interface.\n"],null,[]]