I´m trying to automate the filling of some information in a webpage with javascript.
All the fields have IDs, for example:
<div id="cc-container" class="field has-float-label">
<input placeholder="ccnumber" id="credit_card_number" maxlength="16" name="credit_card[ovv]" size="16" type="tel" value="">
</div>
And then I just insert the info with:
document.getElementById("credit_card_number").focus();
document.getElementById("credit_card_number").value = variable_ccnumber;
But the last one doesn´t have an ID:
<div id="cvv-container" class="visa has-float-label">
<input placeholder="cvv" maxlength="4" name="credit_card[meknk]" size="4" type="tel" value="">
</div>
How can I insert what I want in this case?
Thanks.
PD: I'm only starting to code so please don´t assume I will understand everything you throw at me