<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<title>jquery全屏插件</title>
<script src="jquery.js"></script>
<script src="jquery.fullscreen.js"></script>
</head>
<body id="content">
<script>
$(function(){
if($.support.fullscreen){
$('#fullScreen').click(function(){
$('#content').fullScreen();
// 设置一些属性
$('#content').fullScreen({
'background' : '#FFF'
// 'callback' : function(isFullScreen){
// alert('按ESC键可以退出全屏!');
// }
});
});
}
});
</script>
<input type="button" id="fullScreen" value="全屏" />
<h1>hello word</h1>
<h1>hello word</h1>
<h1>hello word</h1>
</body>
</html>
全屏插件下载