JS模拟模式窗口效果
2011-09-03 14:37
453 查看
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>JS模拟模式窗口效果</title>
</head>
<script>
var falpha = 0;
function fchange() {
if (falpha != 90) {
table1.style.filter = "alpha(opacity=" + falpha + ")";
falpha = falpha + 10;
setTimeout("fchange()", 200)
} else {
falpha = 0;
}
}
function sss() {
table1.style.height = (window.document.body.clientHeight > window.document.body.scrollHeight) ? window.document.body.clientHeight : window.document.body.scrollHeight;
table1.style.width = "100%";
table1.style.display = 'block';
table2.style.left = window.document.body.scrollWidth / 2 - 100;
table2.style.top = window.document.body.offsetHeight / 2 - 100;
table2.style.display = 'block';
fchange();
}
function freset() {
table1.style.display = 'none'
table2.style.display = 'none'
}
</script>
<body topmargin="0" leftmargin="0" bgcolor="yellow" style="display: block;">
<!-- 屏蔽层 -->
<table id="table1" style="background: #FFFFFF; display: none; position: absolute;
z-index: 1; filter: alpha(opacity=90)" oncontextmenu="return false">
<tr width="100%" height="100%">
<td>
</table>
<table oncontextmenu="return false" id="table2" border="2" style="background: #E1E100;
border-color: red; display: none; position: absolute; z-index: 2; width: 200;
height: 100;" cellspacing="0" cellpadding="0" bordercolor="#800000">
<tr width="150" height="20">
<td align="right" bordercolor="#E1E100">
<input type="button" onclick="freset()" value='确定'>
</td>
<td bordercolor="#E1E100">
<input type="button" onclick="freset()" value='取消'>
</td>
</tr>
</table>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<p>
<br>
<br>
<br>
<br>
<input type="button" onclick="sss()" value='申请提交'>
</p>
</body>
</html>
相关文章推荐
- JS窗口最大化(模拟最大化和点击最大化按钮效果)
- js 模拟QQ聊天窗口图片播放效果(带滚轮缩放)
- js模拟QQ窗口的抖动效果
- js模拟QQ窗口的抖动效果
- js 整站模式窗口打开
- 当前窗口中漂浮框的js代码-可见效果
- js实现select跳转菜单新窗口效果代码分享(超简单)
- js模拟真实翻页的照片展示效果,超酷~
- js模拟qq印象效果
- JS实现漂亮的窗口拖拽效果(可改变大小、最大化、最小化、关闭)
- 通过JS模拟select表单,达到美化效果[demo][转]
- js模拟form打开新窗口
- js右下角弹出窗口,点击可关闭效果
- js实现小窗口拖拽效果
- js 模式窗口的使用
- JS模拟实现Select效果代码
- js右下角弹出窗口,点击可关闭效果
- js模拟画笔效果
- js仿百度登录页实现拖动窗口效果
- js实现模拟计算器退格键删除文字效果的方法