Lab15
This commit is contained in:
		
							
								
								
									
										22
									
								
								Chapter ZIPs/JavaScript/ch7/ex_7_13.html
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										22
									
								
								Chapter ZIPs/JavaScript/ch7/ex_7_13.html
									
									
									
									
									
										Executable file
									
								
							@@ -0,0 +1,22 @@
 | 
			
		||||
<html>
 | 
			
		||||
<head>
 | 
			
		||||
<title>Example 7.13</title>
 | 
			
		||||
<script>
 | 
			
		||||
function begin()
 | 
			
		||||
{
 | 
			
		||||
	var now = new Date(); var before = new Date(); var later = new Date();
 | 
			
		||||
	before.setFullYear(1812, 2, 3);
 | 
			
		||||
	later.setFullYear(2095,6,15);
 | 
			
		||||
	document.getElementById('now').innerHTML = ("Today's date: " + now);
 | 
			
		||||
	document.getElementById('before').innerHTML = ("In the past it was: " + before);
 | 
			
		||||
	document.getElementById('later').innerHTML = ("One day it will be: " + later);
 | 
			
		||||
}
 | 
			
		||||
</script>
 | 
			
		||||
</head>
 | 
			
		||||
<body><table align="center" width = "70%"><tr><td><br />
 | 
			
		||||
<input type ="button" onclick="begin()" value = "Does anyone know what day it is?"><br />
 | 
			
		||||
<h3><span id = "now"> </span></h3>
 | 
			
		||||
<h3><span id = "before"> </span></h3>
 | 
			
		||||
<h3><span id = "later"> </span></h3>
 | 
			
		||||
</body>
 | 
			
		||||
</html>
 | 
			
		||||
		Reference in New Issue
	
	Block a user