Professional Documents
Culture Documents
- LJIET)
UNIT – 3
JAVA SCRIPT
Topics to be covered
Examples
Examples
1. Write a JavaScript that handles following
events:
Gives the key code for the key pressed.
The script should give message that “vowel is
pressed” if vowel keys are pressed.
Background colour should change after releasing
the pressed key.
Examples –cont.
Examples –cont.
2. Show the heading. When the mouse is over the
heading it should be yellow and when the mouse
goes out of the heading color should change to
black
Examples –cont.
3. Write a program to display today’s date.
The getDay()
method returns the
weekday as a
number between 0
and 6. (Sunday=0,
Monday=1,
Tuesday=2 ..)