In my programming I have two div
with buttons to hide them and I have two inputs: nota1
and nota2
and I have a button to add those two inputs. I want those two buttons to be added only when the div1
is hidden.
Annex my code:
<!DOCTYPE html>
<html>
<head>
<title>Probando</title>
<script type="text/javascript">
function ocultar1() {
document.getElementById('nologrado1').style.display = "none";
}
</script>
</head>
<body>
<div id="nologrado1">
<h1>No logrado 1</h1>
<input type="submit" value="ocultar 1" onclick="ocultar1()">
</div>
<div id="nologrado2">
<h1>No logrado 2</h1>
<input type="submit" value="ocultar 2" onclick="ocultar2()">
</div>
<br><br><br>
<input type="text" placeholder="nota1">
<input type="text" placeholder="nota2">
<!--Quiero que este boton sume, la nota1 mas la nota 2, unicamente si el div logrado 1, esta ocultado.-->
<input type="submit" value="sumar" onclick="sumar()">
<!--Quiero que este boton sume, la nota1 mas la nota 2, unicamente si el div logrado 1, esta ocultado.-->
</body>
</html>