网页全屏插件 screenfull.js

代码如下:


<script src="/wp-content/uploads/2015/02/screenfull.js"></script>
<button id="btn_full_scr">全屏测试按钮</button>
<script>// <![CDATA[
jQuery(function() {

 jQuery('#btn_full_scr').click(function() {
 if (!screenfull.enabled) {
 alert('你的浏览器不支持全屏');
 }
 screenfull.request();
 // does not require jQuery, can be used like this too:
 //screenfull.request(document.getElementById('container'));
 });
});
// ]]></script>

Leave a Comment

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据