forked from AttackXiaoJinJin/reactExplain
-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.html
71 lines (56 loc) · 2.09 KB
/
test.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>test</title>
</head>
<body>
<div id="a" style="border: 1px red solid;">
<input type="button" value="点我" onclick="click()"/>
<div id="fuce" style="border: 1px greenyellow solid;display: none">浮层</div>
</div>
<script src="moment.js"></script>
<script src="jquery-3.4.1.min.js"></script>
<script>
function click() {
console.log('dissss')
const dis=document.getElementById('fuce').style.display
document.getElementById('fuce').style.display=dis==='block'?'none':'block'
}
// if (state.popupVisible) {
// let currentDocument
// if (!this.clickOutsideHandler && (this.isClickToHide() || this.isContextMenuToShow())) {
// currentDocument = props.getDocument();
// this.clickOutsideHandler = addEventListener(currentDocument, 'mousedown', onDocumentClick);
// }
// // always hide on mobile
// if (!this.touchOutsideHandler) {
// currentDocument = currentDocument || props.getDocument();
// this.touchOutsideHandler = addEventListener(currentDocument, 'touchstart', onDocumentClick);
// }
// // close popup when trigger type contains 'onContextMenu' and document is scrolling.
// if (!this.contextMenuOutsideHandler1 && this.isContextMenuToShow()) {
// currentDocument = currentDocument || props.getDocument();
// this.contextMenuOutsideHandler1 = addEventListener(currentDocument, 'scroll', this.onContextMenuClose);
// }
// // close popup when trigger type contains 'onContextMenu' and window is blur.
// if (!this.contextMenuOutsideHandler2 && this.isContextMenuToShow()) {
// this.contextMenuOutsideHandler2 = addEventListener(window, 'blur', this.onContextMenuClose);
// }
// return;
// }
//
// function onDocumentClick(event) {
// if (_this5.props.mask && !_this5.props.maskClosable) {
// return;
// }
//
// var target = event.target;
// var root = findDOMNode(_this5);
// if (!contains(root, target) && !_this5.hasPopupMouseDown) {
// _this5.close();
// }
// };
</script>
</body>
</html>