Survei Riset: Ceritakan pengalaman Anda dengan Blockly
Mulai survei
blockly > FieldImage > setAlt
Metode FieldImage.setAlt()
Tetapkan teks alternatif untuk gambar ini.
Tanda Tangan:
setAlt(alt: string | null): void;
Parameter
Parameter |
Jenis |
Deskripsi |
alt |
rangkaian | null (kosong) |
Teks alternatif baru. |
Hasil:
void
Kecuali dinyatakan lain, konten di halaman ini dilisensikan berdasarkan Lisensi Creative Commons Attribution 4.0, sedangkan contoh kode dilisensikan berdasarkan Lisensi Apache 2.0. Untuk mengetahui informasi selengkapnya, lihat Kebijakan Situs Google Developers. Java adalah merek dagang terdaftar dari Oracle dan/atau afiliasinya.
Terakhir diperbarui pada 2024-08-22 UTC.
[null,null,["Terakhir diperbarui pada 2024-08-22 UTC."],[[["The `FieldImage.setAlt()` method updates the alternative text associated with a FieldImage object."],["This method accepts a single parameter: `alt`, which can be a string containing the new alternative text or null to remove existing alt text."],["Calling `setAlt()` does not return any value (void)."],["This function helps improve accessibility by providing descriptive text for screen readers and other assistive technologies."]]],[]]