Toggle button, button class

1

I'm trying to make a toggle button, but I have a problem the button I want needs a class to stylize in css.

button class="button button1">Shadow Button</button

, but the toggle button code I got uses a type on the button

button onclick="myFunction()">Try it</button

How do I call this onClick on this button with class:

button class="button button1">Shadow Button</button
    
asked by anonymous 28.12.2017 / 14:36

1 answer

3

Normal Felipe:

<button type="QUALQUER TIPO (button, submit etc)" onclick="QUALQUER FUNCAO PODE SER CHAMADA AQUI (alert, myfunction etc)" class="QUALQUER CLASSE (button btn btntoogle etc")> meu botao</button>

In HTML5 you can by click on functions and add classes in almost all elements

    
28.12.2017 / 15:01