+ 3
How to make and check events in javascript on sololearn? Please help!
3 ответов
+ 8
here's an example of a button click event thru javascript
HTML:
<button id="myBtn">Click Me!<button>
JavaScript:
var myBtn = document.getElementById("myBtn");
myBtn.onclick = function(){
// do something
}
+ 6
what kind of events?
touch? mouse click? phone tilt? something else?
+ 2
like mousepressed or keypressed