十进制文本框java脚本 [英] decimal text box java script

查看:88
本文介绍了十进制文本框java脚本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好所有

如何在java脚本中创建文本框有这个属性

1-默认以0.000开头

2-添加comma automaticlly in thousand number

示例

输入输出

2000 2,000

2000000 2,000,000

20000 20,000



在结束时你会有文字框

开始

0.0000

当你尝试它时

输入输出

999 999.000

7659 7,659.000

988.986 988.986

8768.98 8,768.980

hello to all
how can create text box in java script have this properties
1- default begin with 0.000
2- add comma automaticlly in thousand number
example
input out put
2000 2,000
2000000 2,000,000
20000 20,000

in the finish you will have text box
begin
0.0000
and when you try it
input output
999 999.000
7659 7,659.000
988.986 988.986
8768.98 8,768.980

推荐答案

看看这里:

http://scottonwriting.net/sowblog/archive/ 2011/06/25 / Creating-a-currency-masked-textbox-with-the-fly-currency-formatting.aspx [ ^ ]

http://forum.zkoss.org/question/39244/how-to-apply-a-mask-to-a-textbox-value-while-user-is -typing-javascript-regex-issue / [ ^ ]

http://stackoverflow.com/questions/11104450/how-to-apply-input-mask-on- a-textbox [ ^ ]



谷歌是你的朋友;)
Have a look here:
http://scottonwriting.net/sowblog/archive/2011/06/25/creating-a-currency-masked-textbox-with-on-the-fly-currency-formatting.aspx[^]
http://forum.zkoss.org/question/39244/how-to-apply-a-mask-to-a-textbox-value-while-user-is-typing-javascript-regex-issue/[^]
http://stackoverflow.com/questions/11104450/how-to-apply-input-mask-on-a-textbox[^]

Google is Your Friend ;)


你需要jquer y蒙面输入插件。



蒙面输入插件 [ ^ ]





谢谢

-debasis
You need jquery Masked Input Plugin.

Masked Input Plugin[^]


Thanks
-debasis


这篇关于十进制文本框java脚本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆