当点击按钮的时候弹出一个对话框,在上面填写注册信息 用javascript 实现

如题所述

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

相关了解……

你可能感兴趣的内容

本站内容来自于网友发表,不代表本站立场,仅表示其个人看法,不对其真实性、正确性、有效性作任何的担保
相关事宜请发邮件给我们
© 非常风气网