如题所述
第1个回答 2011-12-06
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
<html xmlns="">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<script>
function myclick(){
document.getElementById("form").style.display='block';
}
function on_submit(){
document.getElementById("form").style.display="none";
}
</script>
</head>
<body>
<div id="form" style="display:none;">
<form name="form1" action="" method="post" onsubmit="return on_submit()">
用户名:<input type="text" name="username" /><br />
密码:<input type="password" name="pwd" />
<input type="submit" value="提交" />
</form>
</div>
<input type="button" onclick="myclick()" value="按钮" />
</body>
</html>
<html xmlns="">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<script>
function myclick(){
document.getElementById("form").style.display='block';
}
function on_submit(){
document.getElementById("form").style.display="none";
}
</script>
</head>
<body>
<div id="form" style="display:none;">
<form name="form1" action="" method="post" onsubmit="return on_submit()">
用户名:<input type="text" name="username" /><br />
密码:<input type="password" name="pwd" />
<input type="submit" value="提交" />
</form>
</div>
<input type="button" onclick="myclick()" value="按钮" />
</body>
</html>