• R/O
  • SSH
  • HTTPS

dbdiffreport: 提交


Commit MetaInfo

修订版375 (tree)
时间2022-09-11 11:47:58
作者t0145jp

Log Message

(empty log message)

更改概述

差异

--- trunk/JunkBox/web/modal/sample.html (revision 374)
+++ trunk/JunkBox/web/modal/sample.html (revision 375)
@@ -1,4 +1,5 @@
11 <html>
2+<a href="https://yahoo.co.jp/">Yahoo!</a>
23 <br>あああああ
34 <br>あああああ
45 <br>あああああ
--- trunk/JunkBox/web/modal/test.html (revision 374)
+++ trunk/JunkBox/web/modal/test.html (revision 375)
@@ -1,31 +1,31 @@
11 <html>
22 <body>
33 <script>
4-function getId(id) {
5- return document.getElementById(id);
6-}
74 function modalOpen() {
5+ document.getElementById('block').style.display = "inline";
86 var xhr = new XMLHttpRequest();
97 xhr.onload = function() {
10- getId('modal').innerHTML = xhr.responseText;
11- getId('modal').style.top = 0;
12- getId('modal').style.left = 0;
8+ var e = document.getElementById('modal');
9+ e.innerHTML = xhr.responseText;
10+ e.style.top = 0;
11+ e.style.left = 0;
1312 var top = (window.innerHeight - 300) / 2;
14- var left= (window.innerWidth - 300) / 2;
15- if (top > 0) getId('modal').style.top = top;
16- if (left > 0) getId('modal').style.left = left;
17- getId('modal').style.display = "inline";
18- getId('block').style.display = "inline";
13+ var left= (window.innerWidth - 300) / 2;
14+ if (top > 0) e.style.top = top;
15+ if (left > 0) e.style.left = left;
16+ e.style.display = "inline";
1917 };
2018 xhr.open('GET', 'sample.html?' + Date.now(), false);
2119 xhr.send(null);
2220 }
2321 function modalClose() {
24- getId('modal').style.display = "none";
25- getId('block').style.display = "none";
22+ if (confirm('close ?')) {
23+ document.getElementById('modal').style.display = "none";
24+ document.getElementById('block').style.display = "none";
25+ }
2626 }
2727 </script>
28-<div id="block" style="display:none; z-index:100; position:absolute; top:0; left:0; width:100%; height:100%; background-color:rgba(255,255,255,0.5);"></div>
28+<div id="block" style="display:none; z-index:100; position:absolute; top:0; left:0; width:100%; height:100%; background-color:rgba(0,0,0,0.2);"></div>
2929 <div id="modal" style="display:none; z-index:101; position:absolute; top:0; left:0; width:300px; height:300px; background-color:white; border:1px solid black;"></div>
3030 <input type="button" value="test" onclick="modalOpen();">
3131 </body>
Show on old repository browser