summaryrefslogtreecommitdiffstats
path: root/test/pyhttpd/htdocs/test1/006/006.js
blob: b450067b530d224e10b4c95275e90d20c3eee59f (plain)
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
/**
 * JavaScript Functions File
 */
function returnDate()
{
  var currentDate;
  currentDate=new Date();
  var dateString=(currentDate.getMonth()+1)+'/'+currentDate.getDate()+'/'+currentDate.getFullYear();
  return dateString;
}

function returnHour()
{
  var currentDate;
  currentDate=new Date();
  var hourString=currentDate.getHours()+':'+currentDate.getMinutes()+':'+currentDate.getSeconds();
  return hourString; 
}

function javaScriptMessage(){
	return 'This section is generated under JavaScript:<br>';
}

function mainJavascript(){
	document.write(javaScriptMessage())
	document.write('<ul class="listElements">');
	document.write('<li>Current date (dd/mm/yyyy): ' + returnDate());
	document.write('<br>');	
	document.write('<li>Current time (hh:mm:ss): '+returnHour());
	document.write('</ul>');
}