function validateForm() { var nama = document.getElementById("nama").value; if (nama == "") { alert("Nama harus diisi"); } }