Lab 9 was about creating a webpage which displays the current date and time, and it also presents a change in background of day and night whenever the button is clicked. I was able to apply this by using JavaScript. In addition, I used Adobe Dreamweaver to complete this lab as well. First, I inserted the functions, "UpdateTime( )" , "formatTime (value )", "formatTimeMS (value)" and "UpdateDate" to display the date and the current time on the web page. Then, I constructed two background images which represented the different time of a day by using Adobe Photoshop. After creating the two images, I made two buttons. Subsequently, whenever a user clicks either one of those two buttons, the background image changes to either daytime or nighttime depending on which button the user clicks on. In order to perform these actions, I used the function, "myFunction." Lastly, I reviewed my lab to check if there's anything else that needs to be fixed.
I learned how to display date and time through the use of JavaScript by completing this lab. I also learned how to change the content of an image. In the future, I can use the techniques I obtained from this lab when I need to create a web page that shows date and time and contains buttons that can alter the background image.
No comments:
Post a Comment