Jquery does a simple screen lock prompt box

  • 2020-03-30 02:25:58
  • OfStack

 
<!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> Headless document </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('<div id="zhezhaoc"></div>'); 
$('#zhezhaoc').css({ 
'width' : ''+wwd+'px', 
'height' : ''+wgd+'px', 
'background-color' : '#000000', 
'z-index' : '1100', 
'opacity' : '0.5', 
'position' : 'absolute', 
'top' : '0px', 
'left' : '0px' 
}); 
alert(' Free prompt '); 
}); 
}); 
</script> 
</head> 

<body> 
<a href="#"> Test button </a> 

</body> 
</html> 

Related articles: