代码如下:
<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>
了解 工作生活心情记忆 的更多信息
Subscribe to get the latest posts sent to your email.