0
Guys, this is probably something extremely simple but I’m struggling to solve:
Assuming a code word
<input type = "text" class = "campos" value = "texto1">
<input type = "text" class = "campos" value = "texto2">
<input type = "text" class = "campos" value = "texto3">
<input type = "text" class = "campos" value = "texto4">
Is there a way to get input with the text3 via jquery? With pure javascript I would use
var texto = document.getElementsByClassname("campos")[2].value
but $(".campo")[2].val()
doesn’t work.
I liked . get(). So I can use a for to go through all the fields in search of a specific value. I ended up using Document.getElementsByClassName because I needed to put it to work urgently. As soon as possible I will change to leave standardized c/ Jquery. Thanks
– Wayne Rosan