In my HTML, I have a <select>
with three <option>
elements. I want to use jQuery to check each option's value against a Javascript var
. If one matches, I want to set the selected attribute of that option. How would I do that?
Question&Answers:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…