1
0
mirror of https://github.com/balkian/my_calculator.git synced 2024-11-24 16:12:28 +00:00
my_calculator/calculator.html

22 lines
506 B
HTML
Raw Normal View History

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