Area Web / html
JS Action: Tombol Alert
🚀
Mode Fokus Aktif
Editor dan Preview sedang dibuka di jendela terpisah. Anda bisa menggunakan layar kedua untuk coding, sementara layar ini tetap memantau Misi & AI Mentor.
loading...
ACE EDITOR
Berkas
🌎
Loading...
✕
localhost:8080/index.html
KONSOL VIRTUAL
Konsol siap...
✨ AI MENTOR
Klik tombol di atas untuk cek kodemu.
Target Pembelajaran 3 TUGAS
-
HTML: Beri id='tombol-api' ke button
-
CSS: Ubah warna tombol jadi merah
-
JS: Panggil alert('ROKET DILUNCURKAN!')
Petunjuk:
Sistem peluncuran roket macet! Kita perlu menghubungkan tombol merah ke sistem komputer.
-
HTML: Berikan identitas
id="tombol-api"pada elemen<button>. -
CSS: Ubah warna tombol agar terlihat berbahaya (Ganti
graymenjadired). -
JS: Lengkapi kode di dalam fungsi
onclick. Ketikalert("ROKET DILUNCURKAN!");.
Setelah selesai, klik tombol â–¶ RUN PREVIEW, lalu coba klik tombol merah di layar kanan. Jika benar, notifikasi akan muncul!