⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 js1.js

📁 音乐信息管理系统
💻 JS
字号:
function msg1_1(){
		document.getElementById('div1').className = "divmsg1";
		document.getElementById('div1').innerText = "请使用5--12位";
	}
function msg1_2(){
		document.getElementById('div1').className = "";
		if (document.myform1.password.value == ""){
			document.getElementById('div1').innerText = "请使用5--12位";
			return;
		}
			
		if(document.myform1.password.value.length < 5){
			document.getElementById('div1').className = "divmsg2";
			document.getElementById('div1').innerText = "密码长度5--12位";
			return;
		}
		if(Is0(document.myform1.password.value)){
			document.getElementById('div1').className = "divmsg0";
			document.getElementById('div1').innerText = "安全性能低";
			return;
		}
		if(Is1(document.myform1.password.value)){
			document.getElementById('div1').className = "divmsg0";
			document.getElementById('div1').innerText = "安全性能低";
			return;
		}
		if(Is2(document.myform1.password.value)){
			document.getElementById('div1').className = "divmsg0";
			document.getElementById('div1').innerText = "安全性能低";
			return;
		}
		if(Is3(document.myform1.password.value)){
			document.getElementById('div1').className = "divmsg0";
			document.getElementById('div1').innerText = "安全性能低";
			return;
		}
		
		if(Is4(document.myform1.password.value)){
			document.getElementById('div1').className = "divmsg1";
			document.getElementById('div1').innerText = "安全性能中";
			return;
		}
		
		if(Is5(document.myform1.password.value)){
			document.getElementById('div1').className = "divmsg1";
			document.getElementById('div1').innerText = "安全性能中";
			return;
		}
		if(Is6(document.myform1.password.value)){
			document.getElementById('div1').className = "divmsg1";
			document.getElementById('div1').innerText = "安全性能中";
			return;
		}
		if(Is7(document.myform1.password.value)){
			document.getElementById('div1').className = "divmsg1";
			document.getElementById('div1').innerText = "安全性能中";
			return;
		}
		if(Is8(document.myform1.password.value)){
			document.getElementById('div1').className = "divmsg1";
			document.getElementById('div1').innerText = "安全性能中";
			return;
		}
		if(Is9(document.myform1.password.value)){
			document.getElementById('div1').className = "divmsg1";
			document.getElementById('div1').innerText = "安全性能中";
			return;
		}

		document.getElementById('div1').className = "divmsg1";
		document.getElementById('div1').innerText = "安全性能高";
		return;
			
	}
	
	////////////////////////////////
	function IsNumber(str)///////只有数字
	{
	var number_chars = "1234567890";
	var i;
	for (i=0;i<str.length;i++)
	{
	if (number_chars.indexOf(str.charAt(i))==-1) return false;
	}
	return true;
	}
	////////////////////////////////////
	function Is0(strEmail) { ///////只有数字
	var myReg = /^[0-9]+$/; 
	if(myReg.test(strEmail)) return true; 
	return false; 
	} 
	function Is1(strEmail) { ///////只有小写字母
	var myReg = /^[a-z]+$/; 
	if(myReg.test(strEmail)) return true; 
	return false; 
	} 
	function Is2(strEmail) { ///////只有大写字母
	var myReg = /^[A-Z]+$/; 
	if(myReg.test(strEmail)) return true; 
	return false; 
	} 
	function Is3(strEmail) { ///////只有特殊符号
	var myReg = /^[^a-zA-Z0-9]+$/; 
	if(myReg.test(strEmail)) return true; 
	return false; 
	}
	
	function Is4(strEmail) { ///////只有数字+小字母
	var myReg = /^[a-z0-9]+$/; 
	if(myReg.test(strEmail)) return true; 
	return false; 
	}
	function Is5(strEmail) { ///////只有数字+大字母
	var myReg = /^[A-Z0-9]+$/; 
	if(myReg.test(strEmail)) return true; 
	return false; 
	}
	function Is6(strEmail) { ///////只有数字+特殊符号
	var myReg = /^[^a-zA-Z]+$/; 
	if(myReg.test(strEmail)) return true; 
	return false; 
	}
	function Is7(strEmail) { ///////只有小字母+大字母
	var myReg = /^[a-zA-Z]+$/; 
	if(myReg.test(strEmail)) return true; 
	return false; 
	}
	function Is8(strEmail) { ///////只有小字母+特殊符号
	var myReg = /^[^0-9A-Z]+$/; 
	if(myReg.test(strEmail)) return true; 
	return false; 
	}
	function Is9(strEmail) { ///////只有大字母+特殊符号
	var myReg = /^[^0-9a-z]+$/; 
	if(myReg.test(strEmail)) return true; 
	return false; 
	}
	function Is10(strEmail){////////只有字母+特殊符号
	var myReg = /^[^a-zA-Z0-9]+$/;
	if(myReg.test(strEmail)) return true;
	return false;
	}
	function Is11(strEmail){////////只有大字母+数字+特殊符号
	var myReg = /^[^A-Z0-9]+$/;
	if(myReg.test(strEmail)) return true;
	return false;
	}
	function Is12(strEmail){////////只有小字母+数字+特殊符号
	var myReg = /^[^a-z0-9]+$/;
	if(myReg.test(strEmail)) return true;
	return false;
	}
	
	function Isx(strEmail) { ///////
	var myReg = /^[A-Z01-9a-z]+$/; 
	if(myReg.test(strEmail)) return true; 
	return false; 
	}
	////////////////////////////////
	

function msg2_1(){
		document.getElementById('div2').className = "divmsg1";
		document.getElementById('div2').innerText = "请再输入一遍您上面填写的密码";
	}
function msg2_2(){
		document.getElementById('div2').className = "";
		
		if(document.myform1.confirm_password.value == "" ){
			document.getElementById('div2').innerText = "请再输入一遍您上面填写的密码";
			return;
		}
		
		if(document.myform1.password.value != document.myform1.confirm_password.value ){
			document.getElementById('div2').className = "divmsg2";
			document.getElementById('div2').innerText = "两次输入的密码不相同";
			return;
		}
		document.getElementById('div2').className = "divmsg1";
		document.getElementById('div2').innerText = "填写正确";
		return;
	}

/////////////////
function msg3_1(){
		document.getElementById('div3').className = "divmsg1";
		document.getElementById('div3').innerText = "请正确填写,此号码为您提供服务的身份凭证,且不能修改。";
	}
function msg3_2(){
		document.getElementById('div3').className = "";
		
		if(document.myform1.idnum.value == ""){
			document.getElementById('div3').innerText = "请正确填写,此号码为您提供服务的身份凭证,且不能修改。";
			return;
			}

		if(!Isx(document.myform1.idnum.value)){
			document.getElementById('div3').className = "divmsg2";
			document.getElementById('div3').innerText = "此号码由数字和字母组成,请正确填写";
			return;
		}
			
		document.getElementById('div3').className = "divmsg1";
		document.getElementById('div3').innerText = "请正确填写,此号码为您提供服务的身份凭证,且不能修改。"
		return;
	}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -