-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest11.html
More file actions
147 lines (136 loc) · 4.63 KB
/
test11.html
File metadata and controls
147 lines (136 loc) · 4.63 KB
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
<html>
<head>
<title>sample</title>
<style>
body {
background-color: black;
color: white;
}
div {
}
#weather {
float: right;
}
#Clock {
float: left;
}
#table {
float: left;
}
</style>
<script type="text/javascript"
src="http://code.jquery.com/jquery-2.1.0.min.js">
</script>
<script type="text/javascript">
window.onload = function () {
var display = document.getElementById('display');
setInterval(function () {
var time = new Date();
var hours = time.getHours(); // 시
var minutes = time.getMinutes(); // 분
var seconds = time.getSeconds(); // 초
// 삼항연산자를 이용하여 시, 분, 초를 두 자리로 유지
var clock = '';
clock += ((hours < 10) ? '0' : '') + hours;
clock += ((minutes < 10) ? ':0' : ':') + minutes;
clock += ((seconds < 10) ? ':0' : ':') + seconds;
display.innerHTML = clock;
}, 1000);
}
</script>
<script>
function readTextFile(file) {
var rawFile = new XMLHttpRequest();
rawFile.open("GET", file, false);
rawFile.onreadystatechange = function () {
if (rawFile.readyState === 4) {
if (rawFile.status === 200 || rawFile.status == 0) {
var allText = rawFile.responseText;
document.write(allText);
}
}
};
rawFile.send(null);
/*
setTimeout("readTextFile(file)", 1500);
*/
}
</script>
<script>
$(document).ready(function () {
$('#auto').load('test13.txt');
refresh();
});
function refresh() {
setTimeout(function () {
$('#auto').load('test13.txt');
refresh();
}, 2000);
}
</script>
</head>
<body>
<h1 align="center">
<p id="date" style="font-size:50px;">
<script>
var d = new Date();
document.getElementById("date").innerHTML = d.toDateString();
</script>
<br>
<span id="display"> </span>
</p>
</h1>
<div id="weather">
<table cellpadding=0 cellspacing=0 width=206 style="border:solid 1px #222ad3;font-family:Arial;font-size:12px;background-color:#000000">
<tr>
<td>
<table width=100% cellpadding=0 cellspacing=0>
<tr>
<td width=8 height=30 background="http://rp5.ua/informer/htmlinfa/topshl.png" bgcolor=#222ad3></td>
<td width=* align=center background="http://rp5.ua/informer/htmlinfa/topsh.png" bgcolor=#222ad3>
<a style="color:#ffffff; font-family:Arial;font-size: 12px;" href="http://rp5.ua/12514/ko">
<b>
서울특별시
</b>
</a>
</td>
<td width=8 height=30 background="http://rp5.ua/informer/htmlinfa/topshr.png" bgcolor=#222ad3></td>
</tr>
</table>
</td>
</tr>
<tr>
<td valign=top style="padding:0;">
<iframe src="http://rp5.ua/htmla.php?id=12514&lang=ko&um=00000&bg=%23000000&ft=%23ffffff&fc=%23222ad3&c=%23ffffff&f=Arial&s=12&sc=4" width=100% height=256 frameborder=0 scrolling=no style="margin:0;"></iframe>
</td>
</tr>
</table>
</div>
<div id="table">
<table border="1" width="300" height="500">
<tr>
<td><img src="file:///C:/Users/asch0/Documents/GitHub/project/pic2.png"></td>
<td colspan="3">
<script>readTextFile('test13.txt');
</script>
</td>
</tr>
<tr>
<td><img src="pic2.png"></td>
<td colspan="3">
<div id="auto">
</div>
</td>
</tr>
<tr>
<td>picture</td>
<td colspan="3">value</td>
</tr>
<tr>
<td>picture</td>
<td colspan="3">value</td>
</tr>
</table>
</div>
</body>
</html>