How to get a number value from an input field?

后端 未结 3 490
粉色の甜心
粉色の甜心 2020-12-15 10:55

I have some issues with calculating some stuff with JS and getting the right values out of the input fields (number). When I use this code it doesn\'t show anything. So what

3条回答
  •  臣服心动
    2020-12-15 11:11

    Every id must be converted to integer. Example

    var Malfunctions = parseInt(document.getElementById("Malfunctions").value);
    

    then your ready to go

提交回复
热议问题