1
0
mirror of https://github.com/balkian/my_calculator.git synced 2024-11-25 00:22:28 +00:00

x^3 button

This commit is contained in:
J. Fernando Sánchez 2019-01-29 10:49:14 +01:00
commit 82165b0979
2 changed files with 17 additions and 0 deletions

1
README.md Normal file
View File

@ -0,0 +1 @@
Mi primer fichero en mi primer repositorio, Fernando Sánchez

16
calculator.html Normal file
View File

@ -0,0 +1,16 @@
<!DOCTYPE html><html><head>
<title>Calculator</title><meta charset="utf-8">
<script type="text/javascript">
function cube() {
var num = document.getElementById("n1");
num.value = Math.pow(num.value, 3);
}
</script>
</head>
<body>
<h1>Calculadora de Fernando Sánchez</h1>
Number:
<input type="text" id="n1"><p>
<button onclick="cube()"> x^3 </button>
</body>
</html>