CS 10051 Lecture Notes - Lecture 27: Local Variable, Html Attribute, For Loop

55 views2 pages

Document Summary

Via the tag name var elem = document. getelementbyid(some_id) Elements of the el var imgtags = el. getelelentsbytagname(img) Repeat the number of times, add an image tag. Most derived from the html attributes of the tag. Can change and add things on the page. Children fall under another thing on the tree. For (counter = 0; counter <4 ; counter ++){ alert (counter); } If the counter is zero an alert will pop up, then it will add 1 to its number. If its less than 5 it will alert the counter the number plus 1. Like adding something to the little hole in scratch. Can be called upon from an external file or somewhere else on the webpage. Can be defined in the head or the body. A web page is a file, read one line at a time. Put functions near the top - so it loads well. Parm- parameter - local variable passes through the document.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents