<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>无标题文档</title><style type="text/css">body{ position:relative;}.wang{ width:100%; height:100%; background:#CCC; display:none; z-index:10; position:fixed; top:0px; left:150px; margin:0 auto; left:inherit; padding:0;filter:alpha(opacity=60); /* 针对IE浏览器的透明度 */ opacity:0.6; /* 针对FF浏览器的透明度 */}.wang ul{ width:100px; height:100px; margin:0 auto;} </style></head><body><a οnclick="dianji()">弹出</a><input type="text" /><div class="wang" id="xian" οnclick="guanbi()"><ul><form><label>姓名</label><input id="wangyan" type="text" /><br /><label>密码</label><button style="width:100px; height:100px;" οnclick="guanbi(this)">关闭</button></form></ul></div><script type="text/javascript">function dianji(){ x=document.getElementById("xian"); x.style.display="block"; return false; } function guanbi(name){ var c=document.getElementById("wangyan").value; if(c==3){ x.style.display='none'; return false; } }</script></body></html> posted on 2012-02-08 16:41 阅读( ...) 评论( ...)