Message from JavaScript discussions

October 2020

— You provably have to add a stopPropagation

— 

Hello everyone.
I need an advice if you don't mind.
I need to convert the following codes:

<select id="switch">
<option value="1">Option 1</option>
<option value="2">Option 2</option>
</select>

To <button> or <a> I don't want the dropdown list. I need them to be separated buttons.

Any ideas??

Thank you very much in advance

— Yes, just make buttons?

— I mean how should I tag the id and value?

— What backend do you use?

— Js

— If you want the user to go to another page just make it <a> and change the css so they look like buttons

Message permanent page

— Whats the action you want to perform when the user clicks the button?

— Well I could make you knoe <a href> but I don't want to make many pages. I need to change some sentence in the page as the user clicks

Message permanent page

— So you make an onclick function

— And then write what needs to happen in that function when you click it

— I tried it. Didn't work. I will try again thank you