cara membuat lompatan tombol antara dua fungsi saat diklik di JavaScript
function buttonClick() {
//do stuff
this.onclick = notButtonClick; //function reference to nBC
}
function notButtonClick() {
//do more stuff
this.onclick = buttonClick; //function reference to original function
}
var el = document.getElementById("numberonebutton"); //let for ES6 aficionados
el.onclick = buttonClick; //again, function reference, no ()
Blue-eyed Barracuda