Regarding the problem that input[type=number] cannot get decimal point! ! ! !

  node.js, question

It is found that input is the decimal point entered in nunber, which cannot be obtained by $(el).val (), or any other means. what’s the matter?

I forgot to look at my code with you. I need to use input to get it in real time or I can press key events, but it’s the same. 12. this is not a good situation.

$('input[type="number"]').on('input', function(){

My demand is a bit unique. I need to make all kinds of mobile phones pop up the numeric keyboard, input=”number “,which seems to be necessary. then I need to get all the input in the input box and proofread it regularly, so 12. this kind of situation also needs to be proofread, and then writing a virtual keyboard by myself can be avoided, but the boss needs to change to the system keyboard and ask for help

Test environment:

  • Ubuntu 14.10

  • Chrome 52.0.2743.82 (64-bit)


  • If you enter12.3Can be obtained normally.

  • If you enter12.00Can be obtained normally.

  • If you enter12.The result is12, missing decimal point.