87,989
社区成员
发帖
与我相关
我的任务
分享
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Untitled Document</title>
<script src="jquery.js" type='text/javascript'></script>
<script>
jQuery(function(){
jQuery(".btn").click(
function(){
jQuery("body").append("<div class='DivMask'><iframe border='0' width='100%' height='100%' marginheight='0' marginwidth='0' scrolling='no'></iframe></div>");
SetCss();
}
)
});
function SetCss(){
jQuery('.DivMask').css(
{
height:document.body.clientHeight,
width:document.body.clientWidth,
"background-color": "#CCCCFF",
opacity:10,//兼容
top:"0",
left:"0",//0就不要px了
position: "absolute",//这样就不会在按钮下面了
"z-index":900 //这句报错,不知道为什么“after property id”,
//css属性中带“-”的,一律用引号"z-index"/"background-color"
}
);
}
</script>
</head>
<body>
<input id="button" type="button" class="btn" value="OK"/>
</body>
</html>