When I was at school a long time ago, I saw some js switching effects on the Internet. I tried to write them out in a very clumsy way. I guess many of them are learning css, js friends also had this experience. When I was just doing this js switch, I thought of a good way to share it with you right away. I hope you can take it away.
The Code is as follows:
Function changeDiv (index)
{
For (var I = 0; I <= 5; I ++)
{
If (I = index)
Document. getElementById ('DV _ '+ I). className = "txt1 ";
Else
Document. getElementById ('DV _ '+ I). className = "txt2 ";
}
}
However, you may not be very clear about it. So I posted the html. Let's take a look,
The Code is as follows:
| Member registration |
| Member Name: |
|
5-20 characters (including lowercase letters, numbers, underscores, and Chinese characters) |
| Password: |
|
Use a combination of English letters, numbers, and symbols. |
| Confirm Password: |
|
Enter a new password. |
| Email: |
|
Enter a frequently used email address |
| QQ/phone: |
|
Enter your QQ/phone number |
| Verification Code: |
|
Enter Verification Code |
I have read and agree to the membership terms |
|
|