[英]How can I change the unselected item to selected item from dropdown list without using the iterator function in Jquery?
如何在不使用Jquery中的迭代器功能的情况下将未选择的项目从下拉列表更改为选定的项目?
答案前有两个音符。
这是运行中的jQuery“ not”选择器。
$("select option:not(:selected)").attr("selected", "true");
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.