文本框验证:字母和数字,但始终以字母而非数字开头 [英] Textbox validation: alphabet and numeric but always start with alphabet not numeric

查看:129
本文介绍了文本框验证:字母和数字,但始终以字母而非数字开头的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

textbox validation: alphabet and numeric but always start with alphabet not numeric





我尝试了什么:





What I have tried:

textbox validation alphabet and numeric but always start with alphabet not numeric

推荐答案

您可以使用正则表达式来解决您的问题,请转到 JavaScript RegExp参考 [ ^ ]并努力学习。如果您在尝试后遇到困难,请在此处发布您的代码并寻求帮助。
You can use Regular Expression to solve your problem, head over to JavaScript RegExp Reference[^] and make some effort to learn. If you are stuck after trying, post your code here and ask for help.


使用正则表达式:

Use a Regex:
^[a-zA-Z]\w*


应该这样做。


这篇关于文本框验证:字母和数字,但始终以字母而非数字开头的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆