On the basis of input s to sort through all the options and output a specific block, which is initially hidden?

0 like 0 dislike
Hello, I need based on InputB, taking one from each line to sort through all the options and for each to bring his unit, which must first be hidden. I don't know js, please tell me that you need to correct or add to work check. Thank you.
<!--first line--><!-- second line--><!--third line--><!-- my pay buttons-->12345678

var button1 = document.getElementById("button1"); var button2 = document.getElementById("button2"); var button3 = document.getElementById("button3"); var button4 = document.getElementById("button4"); var button5 = document.getElementById("button5"); var button6 = document.getElementById("button6"); var button7 = document.getElementById("button7"); var button8 = document.getElementById("button8"); var a; var b; var c; function changebtn(value){ if(value==1){ a=1; } if(value==2){ a=2; } if(value==3){ a=3; } if(value==4){ b=1; } if(value==5){ b=2; } if(value==6){ c=1; } if(value==7){ c=2; } if(value==8){ c=3; } if (a=1 && b=1 && c=1) { button1.style.display="block"; } }
by | 14 views

1 Answer

0 like 0 dislike
110,608 questions
257,186 answers
32,844 users