Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- <title>Form Validation</title>
- <script type="text/javascript">
- var thisTime = new Date(2018, 02, 03, 03, 15, 28, 00); //defined time
- //var thisTime = new Date();
- var timeStr = thisTime.toLocaleString(); //time for html use
- var thisHour = thisTime.getHours(); //separate hour html element
- var thisMonth = thisTime.getMonth(); //separate Month html element
- var mapNum = (2*thisMonth+thisHour)%24; //formula for Map Calculations
- var ImgStr = '<img src="sd_sky'+mapNum+'">' //Self navagation for proper sky image
- var h = document.getElementById("planisphere");
- document.getElementById('timestamp').innerHTML = timeStr;
- h.insertAdjacentHTML("afterbegin", imgStr); //insert image into page
- </html>
- </head>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement