Skip to content

Instantly share code, notes, and snippets.

@jasperan
Created June 15, 2020 08:37
Show Gist options
  • Save jasperan/01cf65a1d9b5b3302f3ffa5a2b3d1c2b to your computer and use it in GitHub Desktop.
Save jasperan/01cf65a1d9b5b3302f3ffa5a2b3d1c2b to your computer and use it in GitHub Desktop.
function sumar() {
var caja = document.getElementById("fe694");
var selector = document.getElementById("cmb3");
if (selector.value.toLowerCase() != 'reagendar') { // No hacer nada
return false;
}
if (caja.value == ''){ // Le ponemos el valor por defecto
caja.value = 0;
}
caja.value = parseInt(caja.value) + 1 ;
selector.value = ""
if (selector.value.toLowerCase() == 'contestar') { // En caso de que sea 'contestar', le reiniciamos a 0!
caja.value = 0;
}
}
function ejemplo_corchetes(){
if ("hello" == "hello"){
if (2 == 2){
if (3 == 3){
console.log("Mira los corchetes, estan ordenados jerarquicamente");
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment