Reputation: 197
I am getting below NodeList in console.log.
NodeList[input#p_method_checkmo.radio.validation-passed attribute value = "checkmo", input#p_method_ccsave.radio.validation-passed attribute value = "ccsave"]
Can any one please tell how can i get value ccsave
from this.
Upvotes: 0
Views: 47
Reputation: 68393
Convert it to array first
Array.prototype.slice.call( nodelist );
get the last array item
Array.prototype.slice.call( nodelist ).pop();
get value property from the last item
Array.prototype.slice.call( nodelist ).pop().value;
Upvotes: 2