$(document).ready(function() {
$('i').click(function() {
open($(this).parents('label').prev('select'));
});
});
function open(elem) {
if (document.createEvent) {
var e = document.createEvent("MouseEvents");
e.initMouseEvent("mousedown", true, true, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null);
elem[0].dispatchEvent(e);
} else if (element.fireEvent) {
elem[0].fireEvent("onmousedown");
}
}
js触发select下拉
最新推荐文章于 2023-07-09 09:38:20 发布