Lets say I have a form:
<form>
<input type="text" class="blanked">
<input type="text" class="blanked">
<input type="text" class="blanked">
<input type="submit" value="Press Me">
</form>
Now lets say I use getElementsByClassName to create an array of these elements:
let filledBlanks = Array.from(document.getElementsByClassName( 'blanked' ));
Now I want to iterate through the values the user has entered into each input:
filledBlanks.forEach( filledBlank => {
let inputText = filledBlank.???;
}
This is where I get tripped up. What do I use to get the filled value (not .value)? Or is there a better way to accomplish this?
filledBlank.value?.value)" Why?innerHTMLfor this