Wednesday, October 8, 2014

Lab 5



In lab 5, we had to create if, if-else, and switch statements using JavaScript and show our JavaScript code inside the lab. I used alert boxes to show what condition the number is and I added images of my JavaScript code inside the table.

                         

 I used the code " } function Row1(){ var info=this.id; if(info=="b1") alert('This is the "IF" statement.'); " so, when someone clicks on number 1 , an alert box pops up saying "This is the "IF" statement." I explained in boxes 2 and 3 when/why the If statement is used. I did the same thing for the if-else and switch statements. I can use this skill in the future to create if, if-else, and switch statements to make my labs/projects better.




No comments:

Post a Comment