+ 2

How to use button in HTML with JAVA SCRIPT

please provide code with discription

15th Sep 2018, 2:56 PM
Prasoon Kushwaha
Prasoon Kushwaha - avatar
3 odpowiedzi
+ 2
You should use onclick="myFunction()" if you want your button to be used on js html: <button onclick="myFunction()">Click</button> js: function myFunction() { // Your code here }
15th Sep 2018, 3:25 PM
Ruben Perdigao
Ruben Perdigao - avatar
15th Sep 2018, 3:29 PM
Prasoon Kushwaha
Prasoon Kushwaha - avatar
0
@Ruben Perdigao you missed an n in your code right code: js: function myFunction | that's the error
15th Sep 2018, 11:59 PM
Joaquin Nievas
Joaquin Nievas - avatar