Showing
1 changed file
with
45 additions
and
8 deletions
1 | <!DOCTYPE html> | 1 | <!DOCTYPE html> |
2 | <html> | 2 | <html> |
3 | - <head> | 3 | + |
4 | +<head> | ||
4 | <meta charset="utf-8"> | 5 | <meta charset="utf-8"> |
5 | <title>Hello World!</title> | 6 | <title>Hello World!</title> |
6 | <!-- | 7 | <!-- |
7 | <link rel="stylesheet" href="/css/master.css" > | 8 | <link rel="stylesheet" href="/css/master.css" > |
8 | --> | 9 | --> |
9 | </head> | 10 | </head> |
10 | - <body> | 11 | + |
11 | - <h1>유저 정보 출력</h1><br> | 12 | +<body> |
12 | - <script> | 13 | + <script language="JavaScript"> |
14 | + var name = '<%-name%>'; | ||
15 | + var level = '<%-level%>'; | ||
16 | + var trackId= '<%-trackId%>'; | ||
17 | + var kart='<%-kart%>'; | ||
18 | + | ||
19 | + document.write(name); | ||
20 | + document.write("\n"); | ||
21 | + | ||
22 | + function Img() { | ||
23 | + var a = Math.floor(Math.random() * 9) + 1; | ||
24 | + return "main_character/" + a + ".png"; | ||
25 | + } | ||
26 | + function Img2(){ | ||
27 | + return "level/"+level+".png" | ||
28 | + } | ||
29 | + function Img3(){ | ||
30 | + return "track/"+trackId+".png" | ||
31 | + } | ||
32 | + function Img4(){ | ||
33 | + return "kart/"+kart+".png" | ||
34 | + } | ||
13 | </script> | 35 | </script> |
14 | - <span class="aid">USER ID<%= aid %></span><br> | 36 | + <img id="imgId" src="" width="135" height="100"> |
15 | - <span class="name">NAME<%= name %></span><br> | 37 | + <script>document.getElementById("imgId").src = Img()</script> |
16 | - <span class="level">LEVEL<%= level %></span> | 38 | + <p>레벨</p> |
39 | + <img id="imgId2" src=""> | ||
40 | + <script>document.getElementById("imgId2").src = Img2()</script> | ||
41 | + <H1>――――――――――――――――경기 정보――――――――――――――</H1> | ||
42 | + <p>등수</p> | ||
43 | + <span class="rank"><%= rank %></span> | ||
44 | + <p>주행 시간</p> | ||
45 | + <span class="time"><%= time %></span> | ||
46 | + <p>트랙정보</p> | ||
47 | + <img id="imgId3" src=""> | ||
48 | + <script>document.getElementById("imgId3").src = Img3()</script> | ||
49 | + <p>카트정보</p> | ||
50 | + <img id="imgId4" src="" width="135" height="100"> | ||
51 | + <script>document.getElementById("imgId4").src = Img4()</script> | ||
52 | + | ||
53 | + | ||
54 | +</body> | ||
17 | 55 | ||
18 | - </body> | ||
19 | </html> | 56 | </html> |
... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
-
Please register or login to post a comment