首页 > 其他 > 详细

formsubmit

时间:2015-05-22 11:15:59      阅读:71      评论:0      收藏:0      [点我收藏+]

<<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>sss</title>
<style>
.box
{
width: 50px;
height: 50px;
position: fixed;
top: 50%;
left: 50%;
z-index: 1;
display: none;
background-color: #fff;
}
</style>
</head>
<body id="body">

<form method="post" id="myform" action="a.php">

</form>
<input type="submit" value="提交表单" onclick="display()"/>
<div class="box" id="box">
<input type="submit" value="取消" onclick="delete()"/>
<input type="submit" value="确定" onclick="validate()"/>
</div>

<script type="text/javascript">
function display(){
document.getElementById(‘box‘).style.display=‘block‘;
document.getElementById(‘body‘).style.background=‘#000‘;
}
function validate(){
document.getElementById(‘myform‘).submit();
}
function delete(){
document.getElementById(‘box‘).style.display=‘none‘;
document.getElementById(‘body‘).style.background=‘#fff‘;
}

 


</script>
</body>
</html>

formsubmit

原文:http://www.cnblogs.com/liuwenbohhh/p/4521477.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!