Home > Back-end >  JavaScript bosses will have to
JavaScript bosses will have to

Time:09-18

CodePudding user response:

This is not very simple

CodePudding user response:

The
reference 1/f, ogawa essays response:
this is very simple, isn't it

Please tell me the novice

CodePudding user response:

The form onsubmit="return myfucktion ();"

CodePudding user response:

(/^ [a-z]?=. * ([0-9])?=. * [a zA - Z]) ([a zA - Z0-9] {7, 15}) $/g

CodePudding user response:

This is not difficult to ah, with regular expressions in combination with judgment to do simple statements

CodePudding user response:

Directly with regular expressions

CodePudding user response:

Please tell me the novice

CodePudding user response:

Learned Java for so long will feel or a bit less

CodePudding user response:

 & lt; html> 

<meta charset="utf-8" & gt;


The function the save () {
Var username=document. GetElementById (" username "). The value;
Var password=document. GetElementById (" userpass "). The value;
If (username=='| | username==null) {
Alert (" the user name cannot be empty!" );
return;
}
If (password=='| | password==null) {
Alert (" password cannot be empty!" );
return;
}
Var/reg=^ [a-z] (?=. * ([0-9])?=. * [a zA - Z]) ([a zA - Z0-9] {7, 15}) $/g;
Var checkPass=reg. Test (password);
If (checkPass) {
Alert (" password consists of Numbers and letters, the beginning must be... ");
return;
}
Document. Biaodan. Submit ();
}
</script>
<body>

User name: & lt; Input type="text" name="Ming" id="username"/& gt;

Compact & amp; nbsp; & nbsp; & nbsp; Code: & lt; Input type="password" name="mi" id="userpass"/& gt;





CodePudding user response:

https://blog.csdn.net/weixin_43330884/article/details/102569183
  • Related