Setting the selected attribute on a select list using jQuery

后端 未结 10 965
渐次进展
渐次进展 2020-12-01 00:15

I have the following HTML:







var make = "fiat";

$("#cars option[value='" + make + "']").attr("selected","selected");

提交回复
热议问题