How to make the value passed from other pages equal to a certain one in JS, then the selected one will be selected by default?
var ops = drop-down menu.childNodes;
for(var i=0;i{
if(pass it over The value == ops[i].innerText) //It can also be ops[i].value, depending on the situation
{
ops[i].selected = "selected";
}
}
A simple judgment will suffice, I don’t know where the poster is in trouble