当前位置:网站首页>js实现看板全屏功能
js实现看板全屏功能
2022-08-09 08:45:00 【鱼是一只鱼啊】
界面示意图
界面关键部分
<img class="fullImg" src="/Images/full.png" onclick="fullScreen()" />
js关键部分
function fullScreen() {
var dd = document.documentElement
var isFull = isFullScreen();
if (!isFull) {
if (dd.requestFullscreen) {
dd.requestFullscreen();
} else if (dd.mozRequestFullScreen) {
dd.mozRequestFullScreen();
} else if (dd.webkitRequestFullScreen) {
dd.webkitRequestFullScreen();
}
} else {
var de = document;
if (de.exitFullscreen) {
de.exitFullscreen();
} else if (de.mozCancelFullScreen) {
de.mozCancelFullScreen();
} else if (de.webkitCancelFullScreen) {
de.webkitCancelFullScreen();
}
}
}
function isFullScreen() {
return !!(
document.fullscreen ||
document.mozFullScreen ||
document.webkitIsFullScreen ||
document.webkitFullScreen ||
document.msFullScreen
);
}
边栏推荐
- EMQ X 消息服务器学习记录——为后面的毕设做准备
- Where does detection go forward?
- The 5th Blue Cap Cup preliminary misc reappears after the game
- [MySQL]mysql: Solve the problem of [Err] 1093 - You can't specify target table 'table name' for update in FROM clause
- 图像识别后将识别结果整理成列表,点击列表可跳转到搜索页面
- leetcode 34. 在排序数组中查找元素的第一个和最后一个位置(二分经典题)
- Account and Permission Management
- leetcode 35. 搜索插入位置(二分法+找性质也很关键)
- 正则表达式基础介绍
- leetcode 33. 搜索旋转排序数组 (二分经典题)
猜你喜欢
随机推荐
Introduction to Network Layer Protocols
RDMA
web3到底是什么?
基于appinventor与EasyDL物体检测API的物体检测app
The story of the disappearing WLAN of Windows 10 computers
引导过程与服务控制
交换机的工作原理
OpenHarmony轻智能产品开发直播笔记
探索APP性能优化之稳定性优化(解决方案)
LAN技术-6MSTP
jdbctemplate connects to sql server, the data found in the code is inconsistent with the database, how to solve it?
【redis】使用redis实现简单的分布式锁,秒杀并发场景可用
uva11624 Fire! (双bfs)
Conversion between number systems
OpenHarmony Light Smart Product Development Live Notes
System Security and Application
requests之模拟登录学习
【KD】2022 KDD Compressing Deep Graph Neural Networks via Adversarial Knowledge Distillation
GBJ610-ASEMI超薄整流扁桥GBJ610
Matlab, and nonlinear equations solving linear equations









