<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>DISPLAY USING NONE AND BLOCK</title>
</head>
<body>
<script language="JavaScript">
function setDisplay(id,attribute){
document.getElementById(id).style.display = attribute;
}
</script>
<div id="register" style="display: block;">
<input onclick="setDisplay('myform', 'block');setDisplay('register', 'none');" type="button" value="Register Now" />
</div>
<div id="myform" style="display: none;">
<table>
<tr>
<td>Userid:</td>
<td><input name="userid" TYPE="text" SIZE="20" MAXLENGTH="20"></td>
</tr>
<tr>
<td>Password:</td>
<td><input name="password" TYPE="password" SIZE="20" MAXLENGTH="20"></td>
</tr>
<tr>
<td>Name:</td>
<td><input name="name" TYPE="text" SIZE="30" MAXLENGTH="30"></td>
</tr>
<tr>
<td>Email:</td>
<td><input name="email" TYPE="text" SIZE="50" MAXLENGTH="50"></td></tr>
</table>
<input onclick="setDisplay('myform', 'none');setDisplay('register', 'block');" type="button" value="Go Back" />
</div>
</body>
</html>
No comments:
Post a Comment