با مجموعهها، منظم بمانید
ذخیره و طبقهبندی محتوا براساس اولویتهای شما.
blockly > FieldImage > setOnClickHandler
متد FieldImage.setOnClickHandler().
تابعی را تنظیم کنید که با کلیک روی این تصویر فراخوانی می شود.
امضا:
setOnClickHandler(func: ((p1: FieldImage) => void) | null): void;
پارامترها
پارامتر | تایپ کنید | توضیحات |
---|
تابع | ((p1: FieldImage ) => باطل) | تهی | تابعی که هنگام کلیک روی تصویر فراخوانی می شود یا برای حذف آن null می شود. |
برمیگرداند:
باطل
جز در مواردی که غیر از این ذکر شده باشد،محتوای این صفحه تحت مجوز Creative Commons Attribution 4.0 License است. نمونه کدها نیز دارای مجوز Apache 2.0 License است. برای اطلاع از جزئیات، به خطمشیهای سایت Google Developers مراجعه کنید. جاوا علامت تجاری ثبتشده Oracle و/یا شرکتهای وابسته به آن است.
تاریخ آخرین بهروزرسانی 2025-01-05 بهوقت ساعت هماهنگ جهانی.
[[["درک آسان","easyToUnderstand","thumb-up"],["مشکلم را برطرف کرد","solvedMyProblem","thumb-up"],["غیره","otherUp","thumb-up"]],[["اطلاعاتی که نیاز دارم وجود ندارد","missingTheInformationINeed","thumb-down"],["بیشازحد پیچیده/ مراحل بسیار زیاد","tooComplicatedTooManySteps","thumb-down"],["قدیمی","outOfDate","thumb-down"],["مشکل ترجمه","translationIssue","thumb-down"],["مشکل کد / نمونهها","samplesCodeIssue","thumb-down"],["غیره","otherDown","thumb-down"]],["تاریخ آخرین بهروزرسانی 2025-01-05 بهوقت ساعت هماهنگ جهانی."],[[["The `setOnClickHandler` method allows you to assign a function that will be executed when the FieldImage is clicked."],["This function can be set to `null` to remove any existing click handler."],["The assigned function receives the FieldImage instance as an argument when invoked."]]],["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"]]