Look this sample code
<html>
<head>
<script type = "text/javascript">
</script>
</head>
<body>
<input type="button" value="Show" onClick="show('divBioBottom')">
<input type="button" value="Hide" onClick="hide('divBioBottom')">
<br>
Line 1<br>
<div id="divBioBottom">
content
</div>
Line 3<br>
</body>
</html>
Sample code for creating text box dynamically in javascript
<html>
<head>
<title>Dynamic Form</title>
<script language="javascript">
function changeIt()
{
var i = 1;
my_div.innerHTML = my_div.innerHTML +"<br><input type='text' name='mytext'+ i>"
}
</script>
</head>
<body>
<form name="form" action="post" method="">
<input type="text" name=t1>
<input type="button" value="test" onClick="changeIt()">
<div id="my_div"></div>
</body>
</html>