Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Code example 7-1 1. var eventHandler = function(evt) { 2. if (!evt) { evt = window.event; } 3. if (evt.preventDefault) { 4. evt.preventDefault(); 5. }

Code example 7-1 1. var eventHandler = function(evt) { 2. if (!evt) { evt = window.event; } 3. if (evt.preventDefault) { 4. evt.preventDefault(); 5. } 6. else { 7. evt.returnValue = false; 8. } 9. };

(Refer to code example 7-1) This is cross-browser compatible code that cancels the default action for an event. What do lines 3 - 5 do?

They cancel the default action of the event for all modern browsers.

They cancel the default action of the event for older versions of IE.

They check to see if the page is DOM-compliant.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

What is meant by 'Wealth Maximization ' ?

Answered: 1 week ago

Question

1. Define the nature of interviews

Answered: 1 week ago

Question

2. Outline the different types of interviews

Answered: 1 week ago