Introduce the decimal point at the correct place in the product:
2.5 x 9 = 225
17 x 1.1开发者_开发问答7 = 1989
0.04 x 8 = 32
24 x 1.1 = 264
If you look at the above samples, the decimal point can occur anywhere between the numbers. What would be an intuitive way to capture user input selection here (e.g. in the second sentence, he could choose to put a dot between 1 and 9 or 9 and 8 or 8 and 9)
You can make each digit that can have a decimal point to the left of it have its own span. Then it's easy to capture an event like the user clicking the mouse (or even just hovering over) the span and adding the decimal point to the left of the span's digit.
精彩评论