【发布时间】:2011-12-28 10:14:54
【问题描述】:
可能重复:
Force ASP.NET textbox to display currency with $ sign
In jQuery, what's the best way of formatting a number to 2 decimal places?
我的 ASP.NET 页面上有一个文本框控件,它接受金额。 如果输入为 500,我想将其显示为 500.00。使用 textchanged 事件我无法解决 C# 中的问题。希望 javascript 能做到。任何人都可以通过提供所需的 javascript 或任何其他方式来帮助我吗?
【问题讨论】: