إشعار: يجب
إثبات أهلية جميع المشاريع غير التجارية المسجّلة لاستخدام Earth Engine قبل
15 أبريل 2025 من أجل الحفاظ على إمكانية الوصول إلى Earth Engine.
ui.Select.onChange
تنظيم صفحاتك في مجموعات
يمكنك حفظ المحتوى وتصنيفه حسب إعداداتك المفضّلة.
تسجّل هذه السمة دالة ردّ يتم تشغيلها عند اختيار عنصر.
تعرض هذه الطريقة رقم تعريف يمكن تمريره إلى unlisten() لإلغاء تسجيل وظيفة معاودة الاتصال.
الاستخدام | المرتجعات |
---|
Select.onChange(callback) | سلسلة |
الوسيطة | النوع | التفاصيل |
---|
هذا: ui.select | ui.Select | مثيل ui.Select |
callback | الوظيفة | الدالة التي سيتم تنفيذها عند اختيار عنصر. يتم تمرير القيمة المحدّدة حاليًا وعنصر التحكّم في القائمة المنسدلة إلى دالة معاودة الاتصال. |
إنّ محتوى هذه الصفحة مرخّص بموجب ترخيص Creative Commons Attribution 4.0 ما لم يُنصّ على خلاف ذلك، ونماذج الرموز مرخّصة بموجب ترخيص Apache 2.0. للاطّلاع على التفاصيل، يُرجى مراجعة سياسات موقع Google Developers. إنّ Java هي علامة تجارية مسجَّلة لشركة Oracle و/أو شركائها التابعين.
تاريخ التعديل الأخير: 2025-07-26 (حسب التوقيت العالمي المتفَّق عليه)
[null,null,["تاريخ التعديل الأخير: 2025-07-26 (حسب التوقيت العالمي المتفَّق عليه)"],[[["\u003cp\u003eRegisters a callback function that is triggered when a user selects an item in the ui.Select component.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eonChange()\u003c/code\u003e returns a unique ID that can be used to unregister the callback function using \u003ccode\u003eunlisten()\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe callback function receives the currently selected value and the ui.Select widget as arguments.\u003c/p\u003e\n"]]],["`onChange` registers a callback function that triggers upon item selection. This function receives the selected value and the `ui.Select` instance as arguments. The method returns a unique string ID. This ID is crucial for later removing the callback using the `unlisten()` function. The `ui.Select` instance is accessible within the callback through the 'this' keyword.\n"],null,["# ui.Select.onChange\n\n\u003cbr /\u003e\n\nRegisters a callback that's fired when an item is selected.\n\n\u003cbr /\u003e\n\nReturns an ID which can be passed to unlisten() to unregister the callback.\n\n| Usage | Returns |\n|-----------------------------|---------|\n| Select.onChange`(callback)` | String |\n\n| Argument | Type | Details |\n|-------------------|-----------|---------------------------------------------------------------------------------------------------------------------------|\n| this: `ui.select` | ui.Select | The ui.Select instance. |\n| `callback` | Function | The callback to fire when an item is selected. The callback is passed the currently selected value and the select widget. |"]]