elenat82
12/10/2015 - 3:07 PM

il metodo getSeconds() in JavaScript.html

<!DOCTYPE html>
<html>
<head>
<title>il metodo getSeconds() in JavaScript</title>
<script type="text/javascript">
	var oggi = new Date();
	var secondiOggi = oggi.getSeconds();
	document.write("<p>I secondi dell'orario in questo momento sono " + secondiOggi + "</p>");
	var timestamp = new Date(390655800000);
	var secondiTimestamp = timestamp.getSeconds();
	document.write("<p>I secondi dell'orario corrispondente a questo timestamp in millisecondi sono " + secondiTimestamp + "</p>");
	</script>
</head>
<body>

</body>
</html>