Javascript Example
Screen shot
Javascript code to Show and Hide Div
<html>
<head>
<script language=\"javascript\">

function show(str)
{
if(str==1)
{
document.getElementById(\"user1\").style.display=\'block\';
document.getElementById(\"user2\").style.display=\'none\';
}
else
{
document.getElementById(\"user2\").style.display=\'block\';
document.getElementById(\"user1\").style.display=\'none\';
}
}

</script>
</head>
<body>

<a href=\"#\" onClick=\"show(1);\">User Details1</a>
<a href=\"#\" onClick=\"show(2);\">User Details2</a>

<br><br>

<div id=\"user1\" style=\"display:none\">
Enter Name<input name=\"name\" type=\"text\" /><br />
Enter Email<input name=\"email_id\" type=\"text\" />
</div>

<div id=\"user2\" style=\"display:none\">
Enter Mobile Number<input name=\"name\" type=\"text\" /><br />
Select Hobbies
<select name=\"hobbies\">
<option value=\"\">-- Select Example --</option>
<option value=\"1\">Play Music</option>
<option value=\"2\">Listion Music</option>
<option value=\"3\">Read Newspaper</option>
</select>
</div>

</body>
</html>

You can download source code here