Jump to content

[Resolvido] Form dentro de um form mas oculto


Recommended Posts

   <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";
           document.getElementById("div1").style.display = "block";

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">

<input type="button" value="display Div" onclick="displayDiv()" />

Edited by brunoais
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...

Important Information

By using this site you accept our Terms of Use and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.