with ie6-ie7-ie8
function getInputsByValue(value)
{
var allInputs = document.getElementsByTagName("input");
var results = [];
for(var x=0;x<allInputs.length;x++)
if(allInputs[x].value == value)
results.push(allInputs[x]);
return results;
}
with modern browsers ie9+ (? not sure for ie9 actually) :
document.querySelectorAll("input[value=something]");
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…