-
Notifications
You must be signed in to change notification settings - Fork 0
/
Countries2.Master
72 lines (61 loc) · 2.21 KB
/
Countries2.Master
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
<%@ Master Language="C#" AutoEventWireup="true" CodeBehind="Countries2.master.cs" Inherits="WebApplication1.Countries2" %>
<!DOCTYPE html>
<html>
<head runat="server">
<title>Countries</title>
<link rel="stylesheet" href="style.css">
<asp:ContentPlaceHolder ID="head" runat="server">
</asp:ContentPlaceHolder>
<div class="header" id="myHeader">
<table>
<tr style="font-size:20px;">
<th><div id="txt"></div></th>
<th style="color: rgb(8, 58, 222);">..........................................................................................</th>
<th> Countries </th>
<th><img src="Images/europe.png" alt="W3Schools.com" style="float:right"; width="40" height="25"></th>
<th style="color: rgb(8, 58, 222);">..................................................</th>
<th> <%= loginMsg %> </th>
</tr>
</table>
<!-- <h2 style="font-size:20px;"><h1 style = "float:right;">Countries</h1></h2> -->
</div>
<div class="header" id="myHeader">
<table>
<tr style="font-size:20px;">
<th> Countries </th> </tr>
</table>
</div>
<div class="header2" id="myHeader2">
<h1 style="font-size:15px;">create by Yahli Alton</h1>
</div>
</head>
<body onload="startTime()">
<asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server">
</asp:ContentPlaceHolder>
<script>
window.onscroll = function() {myFunction();}
var header = document.getElementById("myHeader");
var header2 = document.getElementById("myHeader2");
function myFunction() {
header.classList.add("sticky");
header2.classList.add("sticky2");
}
</script>
<script>
function startTime() {
const today = new Date();
let h = today.getHours();
let m = today.getMinutes();
let s = today.getSeconds();
m = checkTime(m);
s = checkTime(s);
document.getElementById('txt').innerHTML = h + ":" + m + ":" + s;
setTimeout(startTime, 1000);
}
function checkTime(i) {
if (i < 10) {i = "0" + i}; // add zero in front of numbers < 10
return i;
}
</script>
</body>
</html>