HTML and Javascript: John Ryan B. Lorca Instructor I
HTML and Javascript: John Ryan B. Lorca Instructor I
Events in JavaScript
Events are moments of interaction between the user and the computer, or internal Windows activity
Keypress Mouse-click
Functions in JavScript
may be pre-defined or user-defined a separate collection of instructions for the computer to follow that is called after an event is triggered or when the user called it on purpose located within the <script> tag in the <head>
Void Functions
<script type=text/javascript> function getSum(x, y) { var sum = 0; sum = x + y; alert(SUM: + sum); } </script>
6
10
12
14