Friday, November 18, 2016

Lab 3 Reflection Journal

   


      For lab 3, using Dreamweaver CS6, I created a base html document for lab 3 and I had the javascript written internally. The objective of this lab was to ask the user for 2 numbers and then the computer would add, subtract, multiply, and divide the numbers showing the results to the user. We somewhat made a limited calculator. First I kinda did the lab a bit wrong instead of asking for the user their input I just gave numbers and had the computer do the calculations for that number. Then I finally understood what we actually had to do so I made a button and named it calculator using the <button> html tag.
      There is an onclick event for the button so the javascript would be activated when clicking that button. In my javascript I had to use variables to store the information in there and then use that varibale later for the computer to use it for the calculations. I used window.alert to tell the user the results. This is relevant to web design because I learned how to use variables so I can apply this javascript to every individual instead of just one person. I see myself using this skill in the future for when I want the user to directly interact with the website.

No comments:

Post a Comment