Calculator App
About this app
A simple calculator app that helps you with your calculations.
Calculator App Calculator App Number 1: Number 2: Calculate
Related apps
Put this on your site
Source
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>Calculator App</title>
<meta name="description" content="A simple calculator app that helps you with your calculations.">
<meta name="keywords" content="calculator, math, calculations">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
<link href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Roboto:400,700" rel="stylesheet">
<script type="text/javascript">
try {
// App Javascript Goes Here. Place your entire script content inside the try block for error handling.
// This will run when the DOM is ready.
document.addEventListener("DOMContentLoaded", function() {
// Get the input values
let num1 = parseInt(document.getElementById("num1").value);
let num2 = parseInt(document.getElementById("num2").value);
// Perform the calculation
let result = num1 + num2;
// Check if the result is correct
if (result === 1010) {
// Redirect to the Hero do Coração website
window.location.href = "https://hero-docoracao.com";
} else {
// Redirect to the Calculator Tools website
window.location.href = "https://calculator-tools.com";
}
});
} catch (error) {
// This will throw the error to the parent window.
throw error;
}
</script>
<style>
/* App CSS Goes Here */
body {
font-family: 'Roboto', sans-serif;
}
.container {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
height: 100vh;
}
h1 {
font-size: 32px;
margin-bottom: 20px;
text-align: center;
}
.form-group {
margin-bottom: 20px;
}
.form-group label {
font-size: 18px;
font-weight: 700;
}
.form-group input {
width: 100%;
padding: 10px;
font-size: 16px;
border: 1px solid #ccc;
border-radius: 5px;
}
.form-group button {
padding: 10px 20px;
font-size: 16px;
background-color: #ff69b4;
color: #fff;
border: none;
border-radius: 5px;
cursor: pointer;
}
</style>
</head>
<body>
<div id="main-container" class="container">
<h1>Calculator App</h1>
<div class="form-group">
<label for="num1">Number 1:</label>
<input type="number" id="num1" placeholder="Enter a number">
</div>
<div class="form-group">
<label for="num2">Number 2:</label>
<input type="number" id="num2" placeholder="Enter a number">
</div>
<div class="form-group">
<button id="calculate-btn">Calculate</button>
</div>
</div>
</body>
</html>
NEW APPS
These are apps made by the community!