Create a simple Calculator using JavaScript HTML and CSS
Here is the source code, Have a great day and plz share this video to all your friends and don't forget to subscribe my channel :)
<code>
<style>
.formstyle{
width:250px;
height:390px;
margin:auto;
border:2px solid black;
}
input{
width:80px;
height:40px;
background-color:blue;
font-size:30px;
color:white;
border-bottom:1px solid black;
}
#finalanswer{
width:250px;
}
width:250px;
}
</style>
</code></div>
<body>
<div class="formstyle">
<form name="formCalci">
<input id="finalanswer" name="answers" type="text" /> <br />
<input onclick="formCalci.answers.value += '1' " type="button" value="1" />
<input onclick="formCalci.answers.value += '2' " type="button" value="2" />
<input onclick="formCalci.answers.value += '3' " type="button" value="3" />
<br />
<input onclick="formCalci.answers.value += '4' " type="button" value="4" />
<input onclick="formCalci.answers.value += '5' " type="button" value="5" />
<input onclick="formCalci.answers.value += '6' " type="button" value="6" />
<br />
<input onclick="formCalci.answers.value += '7' " type="button" value="7" />
<input onclick="formCalci.answers.value += '8' " type="button" value="8" />
<input onclick="formCalci.answers.value += '9' " type="button" value="9" />
<br />
<input onclick="formCalci.answers.value += '+' " type="button" value="+" />
<input onclick="formCalci.answers.value += '-' " type="button" value="-" />
<input onclick="formCalci.answers.value += '/' " type="button" value="/" />
<br />
<input onclick="formCalci.answers.value += '0' " type="button" value="0" />
<input onclick="formCalci.answers.value += '*' " type="button" value="*" />
<input onclick="formCalci.answers.value = eval(formCalci.answers.value) " type="button" value="=" />
<br />
<input id="clearbutton" onclick="formCalci.answers.value = '' " type="button" value="Clear All" />
</form>
</div>
</code>