Posts by Cristiano • 1 point
1 post
-
-1
votes4
answers18339
viewsA: Javascript customize confirm, replace text button "ok" and "Cancel", run function only if clicked on ok
function confirmar(texto, callback1, callback2){ var confirmacao = prompt(texto); if(confirmacao) callback1(); // executa a primeira função de "OK" else callback2(); //…
javascriptanswered Cristiano 1