newnew Posted March 22, 2009 Report Posted March 22, 2009 Ir kkāds select boxis ar vairākām vērtībām. Man vajaga ieselektēt select box to vērtību, kuras value = 'xxxx". (pēc zināma value ieselektēt atbilstošo select boxi). Quote
0 bubu Posted March 22, 2009 Report Posted March 22, 2009 šitā? select_elements.value = "xxxx"; Quote
0 indoom Posted March 23, 2009 Report Posted March 23, 2009 var a = document.getElementById('select_id'); for (var i = 0, l = a.options.length; i < l; ++i) { if (a.options[i].value == 'xxxx') { a.options[i].selected="selected"; break; } } Quote
0 bubu Posted March 23, 2009 Report Posted March 23, 2009 Kāpēc tik sarežģīti, indoom? document.getElementById('select_id').value = "xxxx"; Quote
Question
newnew
Ir kkāds select boxis ar vairākām vērtībām.
Man vajaga ieselektēt select box to vērtību, kuras value = 'xxxx". (pēc zināma value ieselektēt atbilstošo select boxi).
4 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.