I have several html input elements which all look something like this:
<input id="1" type="radio" checked="checked" value="123" name="myinput" />
How do I fetch the input element with javascript by multiple attributes? For instance I want to fetch the input element which is of type radio, is checked and have a value that equals 123?
Basically I want to do something like this (I know this doesn't work):
var myElement = document.body.select('input[type=radio]:checked', 'input[value=123]');
document.querySelector('#1')should be enough