|
JavaScript Tutorial - 5
Ahh ... but what makes JavaScript really exciting is the ability to make your page respond to what the viewer does. For example ... when a button is pressed :o)
In case you've never put a button on a page before,
here's the html you need:
Amazingly easy ... but ... what's that? ... pressing the button didn't do anything?
The secret is the magic word onClick.
You use it like this:
Task 13: I bet you can't guess what Task 13 is :o) Check.
And you've learnt another Javascript word: alert.
It's known as a function. Task 14: Find as many functions as you can from our previous work. But, please note, the ones with new in front of them are objects not functions. And also note that the brackets are right next to the function name. I found 8 including alert(). Check.
Challenge 6:
Write a 2000 word essay on the difference between a variable and ... |
| HOME | Table of Contents | Previous | Next |