ExamVeda
Login
Home
1
Which of the following can be implemented using animation?
Discuss
Answer & Solution
Answer: Option D
Solution:
You can use JavaScript to create a complex animation which includes but not limited to:
1. Fireworks
2. Fade Effect
3. Roll-in or Roll-out
4. Page-in or Page-out
5. Object movements
2
Which is the function that calls another function after a time interval?
Discuss
Answer & Solution
Answer: Option A
Solution:
The setTimeout(function, duration) calls function after duration milliseconds from now.
3
Which function is used to clear the timer value?
Discuss
Answer & Solution
Answer: Option B
Solution:
The clearTimeout(setTimeout_variable) call clears any timer set by the setTimeout() functions.
4
Which is the property used to position the object in the left of the screen?
Discuss
Answer & Solution
Answer: Option C
Solution:
The property object.style.left = distance in pixels or points sets distance from left edge of the screen.
5
Which is the function used to call a function in every time duration?
Discuss
Answer & Solution
Answer: Option B
Solution:
The setInterval(function, duration) calls function after every duration milliseconds.
6
How do we get the DOM object in JavaScript?
Discuss
Answer & Solution
Answer: Option A
Solution:
The getElementbyId() is used to get the DOM object in JavaScript by simply calling that function associated with the HTML document.
7
How to assign the image source in JavaScript?
Discuss
Answer & Solution
Answer: Option C
Solution:
The image source is defined as image.src = “/images/html.gif”.
8
How do we create and preload an image object in JavaScript?
Discuss
Answer & Solution
Answer: Option C
Solution:
The Image() constructor creates and preloads a new image object.
9
Which event handler is triggered when the user’s mouse moves onto a link?
Discuss
Answer & Solution
Answer: Option A
Solution:
The onMouseOver event handler is triggered when the user’s mouse moves onto the link.
10
Which event handler is triggered when the user’s mouse moves away from a link?
Discuss
Answer & Solution
Answer: Option B
Solution:
The onMouseOut event handler is triggered when the user’s mouse moves away from the link.