javascript set input value by class name 1

javascript set input value by class name

var els=document.getElementsByClassName("in1")[0];
els.value = "Test Content"

Here is what the above code is Doing:
1. It’s getting the element with the class name “in1” and storing it in a variable called “els”.
2. It’s setting the value of the element to “Test Content”.

Now, let’s try to do the same thing in Python.

Similar Posts