Hello!

Faced such a problem: in the firewall, <input type="number"/> does not want to work with floating-point numbers, but in Google Chrome everything is fine. Can I somehow solve this problem?

  • one
    In the sense of not want to work? Does not show, shows incorrectly, you write some code and it is executed incorrectly? Clarify the question. - Moonvvell
  • Maybe you need to put a period instead of a comma? - nick_n_a

1 answer 1

Everything works. Try experimenting with the delimiter (full stop or comma) - it probably depends on the regional settings.

 document.querySelector('input').addEventListener('input', function () { document.querySelector('output').textContent = this.value }) 
 <input type=number step=0.01 min=0 max=1> <output></output> 

  • and now manually add a number with a comma, it will not work - Aslan Kussein
  • @AslanKussein, it worked for me - I checked it. - Qwertiy