EECS 1012 Lecture Notes - Lecture 9: Javascript, Regular Expression
ammarmarta2020 and 40175 others unlocked
10
EECS 1012 Full Course Notes
Verified Note
10 documents
Document Summary
Example: anytime you click on the box, the innerhtml changes 2 different entities, same behaviour point to the same function. You use this keyword refers to the element that called the function. Equivalent to saying if box1 is clicked or if box2 is clicked. Every event handler automatically passes an object. Gives you back the element that called it. Otherwise the button will submit submit form elements get id of the form. Timers settimeout() calls a function after a certain amount of time. But how do you have the event go on automatically. You can stop the timer by clearing the timeout of the timer w a certain id setinterval() loops the timer. If statement: you are indexing into the array so if your var > length of array you can go back to 0. You can validate form elements as the user types. When you define it you use / /