I'm trying to write a script that will fill in an input box when certain conditions occur. Currently, I'm trying to use this to create a var for the input box:
var input = document.querySelector("input")
However, there are two identical queries named "input". So instead of picking the input box that I want (the second one) it picks the first input box, which I don't want. Is there a way for me to have the querySelector choose the second input rather than the first one, or would I need to use a different method?