---
title: "页面提交时,防止重复提交,创建遮盖层"
author: "soft901"
date: "2009-06-01T15:42:09Z"
tags: []
slug: "untitled"
draft: false
lastmod: "2009-06-02T11:08:54Z"
id: 399652
url: "https://soft901.iteye.com/blog/399652"
---

```javascript

function wait() {
	var div = document.createElement("DIV");
	div.id = "UnderLay";
	div.name = "UnderLay";
 	//div1.style.width=screen.width;
  	//div1.style.height=screen.height;
 	document.body.appendChild(div);
 	// hide
 	div.style.display = "none";
 	div.onfocus = function(){}
 	div.onclick = function(){}
  	 	
	div.style.display = "";
}


```




```css

#UnderLay {
	position: absolute;
	width: 110%;
	height: 110%;
	cursor: wait;
	bottom: 0;
	right: 0;
	z-index: 500; /* dessus les popups */
	background: white;
	filter: alpha(opacity=50);
	opacity: .5;	
}


```