gpt4 book ai didi

javascript - 在相扑选择插件中通过 jQuery 选择元素不起作用

转载 作者:行者123 更新时间:2023-11-30 15:49:39 27 4
gpt4 key购买 nike

我正在尝试通过 jQuery 在 sumoselect 下拉列表中选择一个值,使用:

 $('select.multiple-select2')[0].sumo.selectItem(2);

它没有被选择。

Sumoselect - https://hemantnegi.github.io/jquery.sumoselect/

请帮助我。

最佳答案

你需要使用selectItem方法如下:

$('select.multiple-select2')[0].sumo.selectItem(2);

查看文档 https://hemantnegi.github.io/jquery.sumoselect/

您正在尝试的setItem 之类的方法不存在。

关于javascript - 在相扑选择插件中通过 jQuery 选择元素不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39592964/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com