文本框,其时间值例如:00:00:00输入,如果我们输入任何其他字符,则该文本框将显示错误消息 [英] TextBox which takes time values ex: 00:00:00 enter if we enter any other character it should show error messsage
本文介绍了文本框,其时间值例如:00:00:00输入,如果我们输入任何其他字符,则该文本框将显示错误消息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
请回答问题
1.TextBox的时间值例如:00:00:00输入,如果我们输入其他任何字符,它应该显示错误消息吗?
please reply question
1.TextBox which takes time values ex: 00:00:00 enter if we enter any other character it should show error messsage?
推荐答案
1.在javascript中创建函数
2.使用键码进行验证
3.并调用按钮的onkeydown事件
1. create a function in javascript
2. use keycode to validate
3. and call it onkeydown event of button
这篇关于文本框,其时间值例如:00:00:00输入,如果我们输入任何其他字符,则该文本框将显示错误消息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文