Home > front end >  The great spirit and have a look, I am a beginner setback
The great spirit and have a look, I am a beginner setback

Time:01-19

Js validated registration form user name length is greater than or equal to 6 and not less than or equal to 12, if the conditions set up form is submitted to regsiter. The popup tooltip HTML pages, or wrong
How do you do this the looked great god help me

CodePudding user response:

Baidu

CodePudding user response:


Title

<body>







/* * add a login button click events/
$(" # login "). Click (function () {
/* get the value of the input box password */
var password=$("#password").val();
/* to determine whether a password compliance */
If (password. Length>=6 & amp; & Password. Length<12)={
Window. The location. Href='https://bbs.csdn.net/topics/page road king;
} else {
Alert (" registration failed ");
}
})
</script>

CodePudding user response:

refer to the second floor "the other shore flower reply:
& lt; head>
Title

<body>







/* * add a login button click events/
$(" # login "). Click (function () {
/* get the value of the input box password */
var password=$("#password").val();
/* to determine whether a password compliance */
If (password. Length>=6 & amp; & Password. Length<12)={
Window. The location. Href='https://bbs.csdn.net/topics/page road king;
} else {
Alert (" registration failed ");
}
})
</script>


Already very detailed! Praise a!
For beginners, it is recommended that you split the problems of its own,
1. Do the validation, you can at least get you need to verify the value of the object
2. The value of the written judgment logic
3. Verification is successful, how to submit the current data
These refinements, specific card at what point to go to baidu or post questions

CodePudding user response:

Thank you thank you thank you thank you thank you
  • Related