Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

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"
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #change #input #javascript #class
ADD COMMENT
Topic
Name
6+9 =