Change option of a select via javascript

Asked

Viewed 37 times

2

I need to develop a function. Has a menu with some links.

By clicking on a link I need the options <option> of a <select> alter.

The data of this <select> is coming straight from the bank. I need to create groups in the javascript than by clicking on link B come the grupo B, click on link T only the grupo T.

  • What have you tried?

  • Your answer is here: http://answall.com/questions/64386/trocar-de-tipo-de-campo-de-formul%C3%A1rio-com-onclick

  • You could maybe use Select2 a component that separates Dropbox into groups looks at https://select2.github.io/

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.