如何验证网站文本框? [英] How to validate website textbox?
本文介绍了如何验证网站文本框?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好,
如何验证网站文本框,它需要
以http://www.google.com
的形式输入
或只是www.googlecom.
请解决它
hi everyone,
how to validate website textbox,it takes the
input in the form of http://www.google.com
or just www.googlecom.
Please solve it
推荐答案
使用验证程序 [ ^ ]或JavaScript [ ^ ]与正则表达式 [ ^ ]
Use Validators[^] or JavaScript[^] with Regular expressions[^]
与RegEx ^(http://)?\w+\.\w+\.\w+
Match with RegEx ^(http://)?\w+\.\w+\.\w+
匹配,它满足您的URL格式.您可以根据需要自定义它.
参考: http://msdn.microsoft.com/en-us/library /ms228595(v=vs.80).aspx [ ^ ]
which satisfies your format of URL. You can customize it as per need.
Ref: http://msdn.microsoft.com/en-us/library/ms228595(v=vs.80).aspx[^]
这篇关于如何验证网站文本框?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文