Answers for "html number"

1

html input get number

<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;
}
Posted by: Guest on November-22-2020
0

html5 number integer

<input type="number" step="1" />
Posted by: Guest on January-08-2020
0

html number

<label for="oddnumber">Odd number (between 1 and 9):</label>
<input type="number" id="oddnumber" name="oddnumber" 
       min="1" max="9"  step="2", value="5">
<!--	max     maximum value allowed
		min     minimum value allowed
		step    legal number intervals
		value   default value 			-->
Posted by: Guest on March-14-2021

Browse Popular Code Answers by Language