javascript - how to get the value of an option in select menu onChange using jquery? -
I am trying to apply the clone selection menu using the following plugins:
< / P>
But I am unable to get the option value of the selection menu, instead it gives the option text.
How to get the value of an option (but not text) in the Thanks, Edit again: No work < / Strong> This does not work It returns , you should use the onChange in the following selection menu by using the jquery call function?
& lt; Script type = "text / javascript" & gt; JQuery (document) .ready (function ($) {$ ("selection"). ScrollectBox ({predetermined: 'dropdown', numVisibleOptions: 4, scrollInterval: 150, scrollOn: 'hover'});});
and choose; Onchange = "function (this);" Id = "selector" category = "selection" & gt; & Lt; Option value = "" selected = "select topic" & gt; Select topic & lt; / Option & gt; & Lt; Option value = "food" & gt; Food & lt; / Options & gt; & Lt; Option value = "P" & gt; Drink & lt; / Options & gt; & Lt; / Select & gt;
& lt; Script type = "text / javascript" & gt; JQuery (document) .ready (function ($) {var selectEvent = function ($ el) {someFunction ($ (this) .val ()); return false;} $ ("selection"). ScrollectBox ({preset: 'Dropdown', numVisibleOptions: 4, onsite widget: selectionIight, scrollinterval: 150, scroll down: 'hover'});}); & Lt; / Script & gt;
[commodity object]
& lt; Script type = "text / javascript" & gt; ScrolllectBox ({predetermined: 'dropdown', numVisibleOptions: 4, scrollInterval: 150, scrollOn: 'hover', onsite event: function (items, Event) {alert (object) .val ();}})}}; & Lt; / Script & gt;
[commodity object]
onSelectEvent property, such as:
jQuery (document) .ready (function ($) { ScrolllectBox ({Preset: 'dropdown', numVisibleOptions: 4, scrollInterval: 150, scrollOn: 'hover', controlled: function (item, event) {warning (item.val ())} }}};});
Comments
Post a Comment