var Malfunctions = parseInt(document.getElementById("Malfunctions").value);
<form id="frm1" action="Calculate.html">
<table width="350px" border="1px">
<tr>
<th colspan="2">Availability</th>
</tr>
<tr>
<td>Total Production Time</td>
<td>
<input type="number" id="TotalProductionTime" placeholder="">hours</td>
</tr>
<tr>
<td>Breaks</td>
<td>
<input type="number" id="Breaks" placeholder="">minutes</td>
</tr>
<tr>
<td>Malfunctions</td>
<td>
<input type="number" id="Malfunctions" placeholder="">minutes</td>
</tr>
<tr>
<td>Theoretical production time:</td>
<td>
<p id="test"></p>
</td>
</tr>
</table>
<input type="button" onclick="Calculate()" value="calculate">
</form>
function Calculate() {
var TotalProductionTime = document.getElementById("TotalProductionTime").value;
var TotalProductionTimeInMinutes = TotalProductionTime * 60;
var Breaks = document.getElementById("Breaks").value;
var Malfunctions = document.getElementById("Malfunctions").value;
var TheoreticalProductionTime = TotalProductionTimeInMinutes - Breaks - Malfunctions;
document.getElementById("test").innerHTML = TheoreticalProductionTime;
}
Code Example |
---|
Html :: html <strong |
Html :: large text class |
Html :: phone number validation html |
Html :: salesforce aura input checkbox |
Html :: bootstrap sweetalert |
Html :: class disabled |
Html :: sell html templates |
Html :: html autoplay loop many videos |
Html :: html syntax |
Html :: input datetime without time |
Html :: html elements list explained |
Html :: style html |
Html :: js input just audio files |
Html :: Superscript the word using html |
Html :: iframe text in html |
Html :: klaviyo properties |
Html :: u tag in html |
Html :: iframe ember pdf |
Html :: telerik export to excel with leading zero |
Html :: a attributes |
Html :: ramda js cdn |
Html :: twig last item |
Html :: google font library |
Html :: Best Carousel Slider For BootStrap HTML5 |
Html :: bootstrap input tagsinput |
Html :: jspdf html to pdf angular 8 |
Html :: html input on enter |
Html :: message box html |
Html :: button onclick href |
Html :: onclick video popup in html codepen |