<<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>sss</title>
<style>
.box
{
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>