O'Reilly logo

JavaScript: 20 Lessons to Successful Web Development by Robin Nixon

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Images

Inserting Inline JavaScript and Events

image

         To view the accompanying video for this lesson, please visit mhprofessional.com/nixonjavascript/.

Sometimes the easiest way to achieve dynamic interaction with users of your web pages is to directly interact with them from the code they are using. So far we have mostly looked at running JavaScript from within <script> elements, but that is not the only way you can use it.

For example, it’s quite legal to place JavaScript instructions inside elements, and you generally do this by attaching them to ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required