开发者

How to design a control which would let an user to put a decimal point at an appropriate position

开发者 https://www.devze.com 2023-01-31 18:05 出处:网络
Introduce the decimal point at the correct place in the product: 2.5 x 9 = 225 17 x 1.1开发者_开发问答7 = 1989

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消