jquery做的一个简单的屏幕锁定提示框
代码如下:
<!doctype html public "-//w3c//dtd xhtml 1.0 transitional//en" "https://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd">
<html xmlns="https://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<script language="javascript" type="text/javascript" src="/js/jquery-1.8.3.min.js"></script>
<script language="javascript" type="text/javascript">
$(document).ready(function(){
$('a').click(function(){
var wwd=$(document).width();
var wgd=$(document).height();
$('body').prepend('<p id="zhezhaoc"></p>');
$('#zhezhaoc').css({
'width' : ''+wwd+'px',
'height' : ''+wgd+'px',
'background-color' : '#000000',
'z-index' : '1100',
'opacity' : '0.5',
'position' : 'absolute',
'top' : '0px',
'left' : '0px'
});
alert('提示框任意');
});
});
</script>
</head>
<body>
<a href="#">测试按钮</a>
</body>
</html>