jQuery UI - 用于输入数字为十六进制的插件?(jQuery UI - Plugin for inputting a number as hex?)
在最近的项目中,我需要一个十六进制掩码(0x0 - 0xFF)作为HTML表单上的输入字段之一。 我知道我可以使用常规输入来获取十六进制值,然后我可以将其与其他表单提交验证一起验证。
但是,对于某些其他十进制字段,我使用ui.spinner.js(github)来允许用户点击向上/向下按钮来切换数字的值。 输入十六进制值有一个类似的控件会很好。 或者至少是一个比简单输入元素更“丰富”的控件。
有谁知道这样的插件是否存在?
提前致谢。
更新
我忽略了提到我正在使用的微调控件。 我为这种困惑道歉。
On a recent project, I need have a hex mask (0x0 - 0xFF) as one of the input fields on an HTML form. I know I could just use a regular input to get the hex value, and then I can validate it along with the other form submission validation.
However, for some of the other decimal fields I am using ui.spinner.js (github) to allow the user to hit the up/down buttons to toggle the value of the number. It would be nice to have a similar control for inputting hex values. Or at least, a control that is a bit "richer" than a simple input element.
Does anyone know if such a plugin exists?
Thanks in advance.
Update
I neglected to mention the spinner control that I am using. My apologies for the confusion.
原文:https://stackoverflow.com/questions/2230619