xhpotterx Posted April 10, 2013 at 01:35 PM Report #502523 Posted April 10, 2013 at 01:35 PM Boas pessoal vinha aqui perguntar se e possível eu ter o meu formulário principal e nesse form ter outro for mas oculto (ou uma cena parecida), onde tinha uma seta e quando clicasse la esse form que esta oculto aparecia, e peritia ser preenchido. Obrigado espero respostas Cumpz
rezanov Posted April 10, 2013 at 01:49 PM Report #502525 Posted April 10, 2013 at 01:49 PM outro form dentro de um form ? nested ? isso não podes. podes ter partes "escondidas" dentro de um div e torná-las visivéis com javascript por exemplo.
xhpotterx Posted April 10, 2013 at 02:40 PM Author Report #502542 Posted April 10, 2013 at 02:40 PM Consegue me arranjar um exemplo ou assim para ver o que consigo fazer?
Solution rezanov Posted April 10, 2013 at 04:37 PM Solution Report #502582 Posted April 10, 2013 at 04:37 PM (edited) <html> <head> <title>Javascript Div Collapse Style Using Display None</title> <script language="javascript" type="text/javascript"> function displayDiv() { var divstyle = new String(); divstyle = document.getElementById("div1").style.display; if(divstyle.toLowerCase()=="block" || divstyle == "") { document.getElementById("div1").style.display = "none"; } else { document.getElementById("div1").style.display = "block"; } } </script> </head> <body> <form> First name: <input type="text" name="firstname"><br> Last name: <input type="text" name="lastname"> <div id="div1"> Last name 2: <input type="text" name="lastname2"> </div> </form> <input type="button" value="display Div" onclick="displayDiv()" /> </body> </html> Edited April 10, 2013 at 06:16 PM by brunoais geshi
xhpotterx Posted April 11, 2013 at 09:02 AM Author Report #502691 Posted April 11, 2013 at 09:02 AM Thanks, o problema foi resolvido
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now