-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscript3.js
More file actions
34 lines (29 loc) · 1019 Bytes
/
Copy pathscript3.js
File metadata and controls
34 lines (29 loc) · 1019 Bytes
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
// JavaScript Document
//this function will find today's date
function calendar(){
var day=['Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday'];
var month=['January','February','March','April','May','June','July','August','September','October','November','December'];
var d=new Date();
setText('calendar-day', day[d.getDay()]);
setText('calendar-date', d.getDate());
setText('calendar-month-year', month[d.getMonth()]+' '+(1900+d.getYear()));
}
//this function will set the text value of tags
function setText(id, val){
if(val < 10){
val = '0' + val; //add leading 0 if val < 10
}
document.getElementById(id).innerHTML = val;
};
//call calendar() when page load
window.onload = calendar;
function del()
{
document.getElementById('dT').style.display='block';
}
function disp(id)
{
window.location = '/web_project/hod2.php?id='+id;
//setTimeout(del, 350);
document.getElementById('dT').style.display='block';
}