该需求对程序员和代码来说都是合理的,但用户期待以符合其当地文化的通用格式来输入及查看数字。
That requirement is reasonable for programmers and code, but users expect to enter and view Numbers in the common format for their local culture.
您虽然可以指导您网站的用户输入所有数字时都采取美国格式,但这真的是最佳答案吗?
You could instruct users of your website to type all Numbers in us format, but is that really the best answer?
您可以 在输入数字之后调用服务器,但是如果有许多使用不同格式的数字字段就太麻烦了。
You could call the server after the number is entered, but this could get annoying if you have a lot of number fields with different formats.
但是有些情况下,您可能想要格式化客户端的数字(例如,接受用户输入并显示值)。
But in some cases, you might want to format the number on the client side (for example, to accept user input and display the value).
完全排除了键入和其他的用户输入错误,在显示格式化的数字文本和从同一个字段中接受数字文本输入之间的关系还是不太好处理。
Completely aside from typos and other user-input errors, there's always been an uneasy relationship between displaying formatted numeric text and receiving numeric text input from the same field.
它确保用户输入一个有效的数字,并提供功能,如自动格式化。
It ensures that the user enters a valid number and provides features such as automatic formatting.
在线程“主要”数字格式异常例外:输入字符串:”;
Exception in thread "main" java. lang. NumberFormatException: For input string: ";
它的主要功能是通过数字视频信号处理将不同格式的视频输入信号转换成特定格式的输出信号。
Its main purpose is to transfer video input signals of different forms to video output signals of specific standard forms by the way of DSP.
它支持修改文件名称,输入或设定日期和时间格式,可以兼容所有支持WIA的数字相机。
WIA-Loader has some useful features like renaming transfered files, import settings or date and time format. WIA-Loader should work without any problem with all the WIA compatible cameras.
它支持修改文件名称,输入或设定日期和时间格式,可以兼容所有支持WIA的数字相机。
WIA-Loader has some useful features like renaming transfered files, import settings or date and time format. WIA-Loader should work without any problem with all the WIA compatible cameras.
应用推荐