Answers for "html input different value and text"

19

js input text set value

document.getElementById("myInputID").value = "My Value"; //set value on myInputID
Posted by: Guest on August-05-2019
0

how to change input value in javascript using class

// 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"
Posted by: Guest on March-30-2020

Code answers related to "html input different value and text"

Code answers related to "Javascript"

Browse Popular Code Answers by Language