标签:验证用户名 doctype javascrip indexof write script oct type char
<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>
	<body>
		<script type="text/javascript">
			var account = ‘maoyuxuanshigede‘;
			if(account.length < 3 || account.length > 10){
				document.write(‘您的账号或者密码有误,账号长度应该为3~10之间,密码为3~16之间‘+"<br />")
			}
			if(account.toLowerCase().indexOf(‘mao‘) !== -1){
				document.write(‘用户名不能包含敏感词‘)
			}
		</script>
		</body>
</html>
标签:验证用户名 doctype javascrip indexof write script oct type char
原文地址:https://www.cnblogs.com/jiaqi818/p/12739652.html