Toggle navigation
Toggle navigation
This project
Loading...
Sign in
kkl
/
Probability Death
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
강병호
2019-06-05 18:20:33 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
fa6851ff5c7d803d08d0ff59706ff2eef86572ff
fa6851ff
1 parent
c62a2c7a
타이머 기능 추가
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
2 deletions
a.html
a.html
View file @
fa6851f
<!DOCTYPE html>
<html>
<style
type =
"text/css"
>
body
{
margin-left
:
0px
;
margin-top
:
0px
;
margin-right
:
0px
;
margin-bottom
:
0px
;
width
:
100%
;
font-size
:
3.0em
;
line-height
:
3.0em
;
font-weight
:
bold
;
font-family
:
Yeon
Sung
;
text-align
:
center
;
color
:
white
;
background-image
:
url(public/images/indexWallpaper.jpg)
;
}
body
{
margin-left
:
0px
;
margin-top
:
0px
;
margin-right
:
0px
;
margin-bottom
:
0px
;
width
:
100%
;
font-size
:
3.0em
;
line-height
:
3.0em
;
font-weight
:
bold
;
font-family
:
Yeon
Sung
;
text-align
:
center
;
color
:
white
;
background-image
:
url(
../
public/images/indexWallpaper.jpg)
;
}
#center_top1
{
position
:
absolute
;
top
:
50px
;
left
:
550px
;
height
:
25%
;
overflow
:
hidden
;
}
...
...
@@ -16,11 +16,12 @@
<body>
<div
id =
"center_top1"
>
(사용자정보) 님은
</div>
<div
id =
"center_top2"
>
(타이머) 뒤에
<div
id =
"timerTxt"
></div>
</div>
<div
id =
"center_top3"
>
(사고 요인)로 인해 사망
...
...
@@ -28,5 +29,32 @@
<div
id =
"center_top4"
>
합니다.
</div>
<script
type =
"text/javascript"
>
var
timerId
;
var
timerSec
=
3
;
window
.
onload
=
function
(){
timerId
=
setInterval
(
'timer()'
,
1000
);
}
function
timer
(){
var
min
=
Math
.
floor
(
timerSec
/
60
)
var
sec
=
timerSec
%
60
;
var
hour
=
Math
.
floor
(
timerSec
/
3600
)
var
msg
=
(
hour
<
10
?
"0"
+
hour
:
hour
)
+
":"
+
(
min
<
10
?
"0"
+
min
:
min
)
+
":"
+
(
sec
<
10
?
"0"
+
sec
:
sec
);
timerSec
--
;
if
(
timerSec
<
0
){
// time end
clearInterval
(
timerId
);
}
document
.
getElementById
(
"timerTxt"
).
innerHTML
=
msg
;
}
</script>
</body>
</html>
\ No newline at end of file
...
...
Please
register
or
login
to post a comment