[英]Jquery jquery.sumoselect
Im trying to use a plugin called jquery.sumoselect from https://github.com/HemantNegi/jquery.sumoselect the thing is everything is well documented but the thing i realy want to know is how do i get the selected values of it missing in documentation or i keep reading over and over it ? 我正在尝试使用来自https://github.com/HemantNegi/jquery.sumoselect的名为jquery.sumoselect的插件,这件事是有据可查的,但我真正想知道的事情是我如何才能得到它的选定值在文档中还是我不断阅读它? does someone knows where or how to do it ?
有人知道在哪里或怎么做吗? I needed it for a asp.net usercontrol im making of it so.
我需要它来作为一个asp.net用户控件。 very handy to know how i get the selected values.
非常方便知道我如何获得选定的值。
You simply read the values from the input that SumoSelect is operating on. 您只需从SumoSelect操作所在的输入中读取值即可。 So if you apply it like this
$('.testselect1').SumoSelect();
因此,如果您像这样使用它
$('.testselect1').SumoSelect();
then simply run $('.testselect1').val();
然后只需运行
$('.testselect1').val();
to get the selected value. 获得选定的值。 You can access the SumoSelect demo page and open the browser console and run
$('.testselect1').val();
您可以访问SumoSelect演示页面并打开浏览器控制台并运行
$('.testselect1').val();
to see. 查看。
This is somewhat expected for a jQuery plugin -- see jQuery .val() . 对于jQuery插件,这在某种程度上是预期的-请参见jQuery .val() 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.