解决方案 »
- JS 控制超链接 双击 问题。
- JS组织结构图(子节点三个以下不出错,子节点四个以上就出错了)
- 如何利用JS 数组记录当前table list中被选中的行数(多选)==急急
- iframe操作另一个iframe,高分在线等
- 大家好难题在线 请大家帮忙 请高手帮忙 谢谢(linhao333)
- 如何在文本框内输入小写金额,自动显示出带分隔符的金额?
- text框中的“20040101”自动变为“2004-01-01”;求代码
- 为什么这句代码会使内存占用率上升
- 怎样使用script语言使当前所有的超级连接失去焦点?--包括网页当中的框架!
- 怎么用高德地图 生成热力图?
- jquery esayUi datagrid 列点击事件问题
- JS版连连看(这年头这么多用JS写怀旧小游戏的,俺也赶流行发一个)
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,
opacity:50,//jquery透明直接opacity,filter本就ie
top:"0px",
left:"0px",
zindex:900 //zindex no z-index
}
);
}
<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>