There is a small problem about switching js that I haven't figured out yet
鹰弘网络科技
鹰弘网络科技 2019-03-07 14:17:16
0
2
1098

Account login parameters ('0','register_',1)

Scan QR code login parameters ('1','register_',1)

<script type ="text/javascript">
function ChangeReg(divId,divName,Count){
for(var i=0;i<=Count;i ){
document.getElementById(divName i). style.display='none'
      }
          document.getElementById(divName divId).style.display='block'
   }

</script>

When I click to scan the code to log in, i=0, so the result is

document.getElementById(register_ 0).style.display='none' //register0 hides

document.getElementById(register 1).style.display='block'//register1 displays

If I click the account again to log in, then i=1, so scan the code to hide the account and display

Then if I click the scan code again, i= Several? Shouldn't it be i=2? Then doesn’t the condition of the for loop hold true?

It’s because the condition is no longer true, so we start from the beginning, so i=0 again? do you mean this?

鹰弘网络科技
鹰弘网络科技

文案代写策划 http://www.hy-wenan.com

reply all(1)
欧阳克

1,

Not logged in or logged in? There should be only two of these states. Why is there a third state?

Not logged in 0, 1 after logged in.

So whether it is account login or scan login, it should be 1.

2, ​

If you are in the login box, the left side is the account login, and the right side is the scan login.

Then click on the left and change it to 0.

Click on the right and change 1.

There will be no 2.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template