点击一个添加按钮会弹出一个表单可以点击提交

<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>点击出现弹框</title>
<script>
function show2(){
    var show_part = document.querySelector('.part');
    show_part.style.display = 'block';
    }
function hide(){
    var show_part = document.querySelector('.part');
    show_part.style.display = 'none';
    }
</script>

<style>

.part{
    display:none;
    background-color:lightskyblue;
    height:300px;
    width:210px;
    position:relative;
    margin:20%;
    }   
</style>
</head>
 
<body>
 
<div class="whole">
	
<button onClick="show2()">点我添加</button>
  <div class="part">
     <from action="1.html" method="post">
    姓名:<input type="text" id="names" value="小明" size="18px"> <br>
    系别:<input type="text" id="departments" value="电子信息工程" size="18px"><br>
    年级:<input type="text" id="ganders" value="18级" size="18px"><br>
    年龄:<input type="text" id="ages" value="23" size="18px"><br>
    民族:<input type="text" id="nations" value="汉族" size="18px" ><br>
    籍贯:<input type="text" id="nativess" value="福建" size="18px" ><br>
    身份证:<input type="text" id="identitys" value="352228199904134516" size="18px" ><br>
    地址:<input type="text" id="addresss" value="福建福州" size="18px"><br>
    电话:<input type="text" id="phones" value="15860680882" size="18px"><br>
  <input type="submit" value="添加"> <br><br>
  </from>	

   <div>
  </div>
</body>
</html>

 

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值