Cara Mengubah Nilai Input Dalam JavaScript Menggunakan Kelas

// Find the input element with a class of "bar" that is a direct child of a form with a name attribute of "foo"
document.querySelector("form[name='foo'] > input.bar").value = "hehe works"
Testy Thrush