Duyuru:
15 Nisan 2025'ten önce Earth Engine'i kullanmak için kaydedilen tüm ticari olmayan projelerin Earth Engine erişimini sürdürmek için
ticari olmayan uygunluğu doğrulaması gerekir.
ui.Textbox.onChange
Koleksiyonlar ile düzeninizi koruyun
İçeriği tercihlerinize göre kaydedin ve kategorilere ayırın.
Metin kutusundaki metin değiştiğinde çağrılan bir geri çağırma kaydeder.
Geri çağırma işlevi özellikle şu durumlarda çağrılır:
- Kullanıcı yeni bir değer yazar ve ardından metin kutusu odağını kaybeder veya kullanıcı Enter tuşuna basar.
- Yeni bir değer, set('value', newValue) ile programatik olarak ayarlanır.
Geri çağırma işlemini kaydını silmek için unlisten() işlevine iletilebilecek bir kimlik döndürür.
Kullanım | İadeler |
---|
Textbox.onChange(callback) | Dize |
Bağımsız Değişken | Tür | Ayrıntılar |
---|
bu: ui.textbox | ui.Textbox | ui.Textbox örneği. |
callback | İşlev | Metin değiştiğinde tetiklenecek geri çağırma. Geri çağırma, metin kutusunda ve metin kutusu widget'ında bulunan metni alır. |
Aksi belirtilmediği sürece bu sayfanın içeriği Creative Commons Atıf 4.0 Lisansı altında ve kod örnekleri Apache 2.0 Lisansı altında lisanslanmıştır. Ayrıntılı bilgi için Google Developers Site Politikaları'na göz atın. Java, Oracle ve/veya satış ortaklarının tescilli ticari markasıdır.
Son güncelleme tarihi: 2025-07-26 UTC.
[null,null,["Son güncelleme tarihi: 2025-07-26 UTC."],[[["\u003cp\u003eTriggers a function when the textbox content is modified, either by user input or programmatically.\u003c/p\u003e\n"],["\u003cp\u003eThe registered function receives the current text and the textbox widget as arguments.\u003c/p\u003e\n"],["\u003cp\u003eProvides a method to unregister the function using a unique ID returned during registration.\u003c/p\u003e\n"],["\u003cp\u003eText change is triggered by user input (typing followed by focus loss or pressing Enter), or by programmatically setting a new value.\u003c/p\u003e\n"]]],[],null,["# ui.Textbox.onChange\n\n\u003cbr /\u003e\n\nRegisters a callback that's called when text in the textbox changes.\n\n\u003cbr /\u003e\n\nIn particular, the callback is called when:\n\n- The user types a new value and then either the textbox loses focus or the user presses enter.\n\n- A new value is set programmatically with set('value', newValue).\n\nReturns an ID which can be passed to unlisten() to unregister the callback.\n\n| Usage | Returns |\n|------------------------------|---------|\n| Textbox.onChange`(callback)` | String |\n\n| Argument | Type | Details |\n|--------------------|------------|------------------------------------------------------------------------------------------------------------------------------|\n| this: `ui.textbox` | ui.Textbox | The ui.Textbox instance. |\n| `callback` | Function | The callback to fire when the text changes. The callback is passed the text currently in the textbox and the textbox widget. |"]]