+ 3
How can I specify what will happen after a button was clicked?
When I was reading a HTML lesson, I saw a paragraph containing a "<button>" word. Then I entered the Code Playground and wrote an experimental (private) code. I want to specify what will happen when the button was pressed. Could someone help me with this?
2 Respuestas
+ 5
You're halfway through the JavaScript course. Complete it and you will get what you need :)
https://www.sololearn.com/learn/JavaScript/2758/ (only if you're too lazy :P)
+ 4
<button onclick="doSomething()" >
</button>
function doSomething(){
alert("hello");
//specify what you wantcto happen
}