Dan*_*iKR 5 javascript message
I have found this Jsfiddle http://jsfiddle.net/HkEuf/2650/ which allow entering only numbers in input field. Now I want to put inside input field Placeholder which will also be error message (look at Jsfiddle).
Number : <input type="text" name="quantity" id="quantity" placeholder="Test" />
Run Code Online (Sandbox Code Playgroud)
And for error message is:
<span id="errmsg"></span>
Run Code Online (Sandbox Code Playgroud)
Now I whant to do this: First you see input field with placeholder "Test". So if you put numbers, placeholder deletes, and you see only numbers that you enter. But If you put non-digit chars (letters), placeholder changes into error message id="errmsg".
这可能吗?
| 归档时间: |
|
| 查看次数: |
5815 次 |
| 最近记录: |