中文用户名的js检验正则
时间:2022-03-26 03:19:32
username1: "(^[a-zA-Z]{1}([a-zA-Z0-9_]){4,14}|(^[\u4E00-\uFA29]{1}+[a-zA-Z0-9\u4E00-\uFA29]{2,7}))$",
<script>
<!--
function checkStr(str){
// [\u4E00-\uFA29]|[\uE7C7-\uE7F3]汉字编码范围
var re1 = new RegExp("^([\u4E00-\uFA29]|[\uE7C7-\uE7F3]|[a-zA-Z0-9])*$");
if (!re1.test(str)){
alert("否");
return false;
}
alert("是");
return true;
}
//-->
</script>
标签:中文用户名,正则
![](/images/zang.png)
![](/images/jiucuo.png)
猜你喜欢
python在协程中增加任务实例操作
2023-02-17 22:57:48
详细介绍Python进度条tqdm的使用
2022-12-13 19:45:08
![](https://img.aspxhome.com/file/2023/9/77619_0s.gif)
如何利用Python识别图片中的文字详解
2021-02-07 21:05:30
![](https://img.aspxhome.com/file/2023/8/121778_0s.png)
OpenCV imread读取图片失败的问题及解决
2021-10-20 06:44:00
![](https://img.aspxhome.com/file/2023/0/92480_0s.png)
PyCharm更改字体和界面样式的方法步骤
2021-12-24 09:15:25
![](https://img.aspxhome.com/file/2023/8/90708_0s.png)
CSS控制字体效果的思考
2011-06-14 09:44:02
![](https://img.aspxhome.com/file/UploadPic/20072/20072311315168s.gif)
python 实现"神经衰弱"翻牌游戏
2023-02-08 05:34:05
![](https://img.aspxhome.com/file/2023/6/92236_0s.gif)
PDO::errorInfo讲解
2023-06-06 01:51:53
详解python列表生成式和列表生成式器区别
2021-09-13 16:15:14
opencv-python基本图像处理详解
2021-07-07 04:37:02
![](https://img.aspxhome.com/file/2023/3/131673_0s.jpg)
Keras设置以及获取权重的实现
2021-11-22 10:04:09
Django调用支付宝接口代码实例详解
2023-07-19 10:53:51
使用Python实现从各个子文件夹中复制指定文件的方法
2023-11-09 12:04:05
python用什么编辑器进行项目开发
2021-04-17 19:25:20
setInterval 和 setTimeout 会产生内存溢出
2008-03-08 13:10:00
浅谈keras中的Merge层(实现层的相加、相减、相乘实例)
2021-04-03 15:30:48
Python+Selenium+phantomjs实现网页模拟登录和截图功能(windows环境)
2023-11-17 11:00:43
![](https://img.aspxhome.com/file/2023/2/63922_0s.jpg)
PHP实现上传文件并存进数据库的方法
2023-07-03 21:35:14
基于Python实现简易学生信息管理系统
2021-04-07 23:19:49
![](https://img.aspxhome.com/file/2023/4/82774_0s.jpg)
FCKeditor技巧之在按钮旁边加文字
2007-10-10 13:17:00
![](https://img.aspxhome.com/file/UploadPic/200710/10/20071010132030615s.png)