+ 1

Can anyone can correct my code it is a login form

Can anyone can correct my code it is a login form but there is login and signup form both but only the sign in form is opening not the signup form can anyone help me to open both please reply https://code.sololearn.com/WdcBFP9y656Q/?ref=app

27th Jun 2018, 2:54 PM
Developer.R
Developer.R - avatar
3 Antworten
+ 3
With your current code without editing html you could do window.onload = function() { var buttons = document.getElementsByClassName("tab-group")[0].getElementsByTagName("a"); for(var a = 0; a < buttons.length; a++) { buttons[a].addEventListener("click", function(event) { clicked(event); }, false) } } function clicked(event) { event.preventDefault(); document.getElementById("login").style.display = "none"; document.getElementById("signup").style.display = "none"; var element = event.target; var id = element.getAttribute("href").substr(1, element.getAttribute("href").length); document.getElementById(id).style.display = "block"; }
27th Jun 2018, 6:46 PM
Toni Isotalo
Toni Isotalo - avatar
+ 5
You register form is hidden. .tab-content > div:last-child { display: none; }
27th Jun 2018, 3:55 PM
Toni Isotalo
Toni Isotalo - avatar
+ 2
but how can use both button
27th Jun 2018, 5:15 PM
Developer.R
Developer.R - avatar