在 jSuites 的下拉列表中选择同上时如何触发函数?

发布于 2025-01-18 13:43:48 字数 425 浏览 3 评论 0原文

我正在尝试使用jSuites创建下拉菜单,一旦选择了列表中的一个项目,该jSuites会发出功能。

不幸的是,我不知道如何启动该功能。我尝试使用“ on Change”作为< div>的属性,并且在jdropdown的定义中尝试过,但似乎没有任何作用。

我在这里附上一个小提琴,其中包含使用该工作的下拉菜单,并且可以做应该做的事情,而两个jSuites菜单应该以相同的方式行为,但他们却没有……

我在做什么错?

这可以做到吗?

欢迎任何帮助...

http://jsfiddle.net/2x4qnj1h/1/

I'm trying to create a dropdown menu with jSuites that fires a function once one of the items in the list is selected.

Unfortunately, I can't figure out how to fire the function. I tried with "onchange" both as attribute of the <div> and within the definition fo the jdropdown, but nothing seems to work.

I attach a fiddle here with a dropdown menu made with that works and does what it should, and two jSuites menus that should behave in the same way but they don't...

What am I doing wrong?

Can this be done at all?

Any help is welcome...

http://jsfiddle.net/2x4qnj1h/1/

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

唔猫 2025-01-25 13:43:48

请使用它:

onchange: refresh_dropdown,

您使用的是文字,而不是函数。

带有示例的文档: https://jsuites.net/v4/dropdown-and-autocomplete/事件

use that instead:

onchange: refresh_dropdown,

you used a literal, not a function.

Documentation with examples : https://jsuites.net/v4/dropdown-and-autocomplete/events

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文