Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

get html input value by class name

// 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 = "blah"
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #html #input #class
ADD COMMENT
Topic
Name
1+8 =