-2
How to make this form do this account: ((a-b)+(((a-b)*0,1)+((a-b)*0,1268))))/240
?
I want the "property price" and "entry value" fields to be filled in and then when you click on "calculate", the result will appear in the "result".
If (a) is equal to 1000 and (b) equal to 100 the result is 4,6005. And after you have done the calculation, click "clean" to clear the fields.
- a = price of the property
- b = input value
0,1
,0,1268
and240
are fixed values
form{
width: 220px;
height: 360px;
background: #002776;
border-radius: 4px;
box-shadow: 0 0 20px 1px rgba(0,0,0,0.7);
padding: 0 2% 2% 2%;
box-sizing: border-box;
}
.tsmr{
text-align: center;
color: #fff;
margin: 0 0 10% 0;
padding: 5% 0 5% 0;
font-size: 20px;
font-family: 'Roboto', sans-serif;
box-shadow: 0 0 20px 1px rgba(0,0,0,0.7);
}
.sml{
width: 96%;
margin: 1% 0 4% 0;
}
#btn, #btn1{
width: 100%;
height: 30px;
margin: 9% 0 0 0;
font-weight: bold;
font-family: 'Roboto', sans-serif;
box-shadow: 0 0 20px 1px rgba(0,0,0,0.7);
background: #fff;
color: #000;
border-radius: 4px;
letter-spacing: 2px;
border: none;
font-size: 15px;
cursor: pointer;
}
#lbs{
font-size: 13px;
color: #fff;
letter-spacing: 1px;
font-family: 'Roboto Condensed', sans-serif;
}
#lbs2{
font-size: 13px;
color: #fff;
letter-spacing: 1px;
font-family: 'Roboto Condensed', sans-serif;
}
#lbs3{
font-size: 13px;
color: #fff;
letter-spacing: 1px;
font-family: 'Roboto Condensed', sans-serif;
}
<form>
<p class= "tsmr">SIMULADOR</p>
<label id="lbs">PREÇO DO IMÓVEL:</label>
<input class="sml" type="text" value="">
<label id="lbs2">VALOR DA ENTRADA:</label>
<input class="sml" type="text">
<label id="lbs3">RESULTADO:</label>
<input class="sml" type="text">
<button id="btn" type="buttom">CALCULAR</button>
<button id="btn1" type="buttom">LIMPAR</button>
</form>
did not try any javascript code?
– novic
If any answer has served you mark it (the best) as accepted, see https://i.stack.Imgur.com/evLUR.png
– user60252