O'Reilly logo

Essential JavaScript™ for Web Professionals, Second Edition by Dan Barrett

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

onClick

Description: This handler is triggered when either a Form object is clicked upon or the handler is placed within an <href> tag and the image or text link is clicked on.

Syntax: onClick="code to be executed"

Implemented in: Navigator 2.0/3.0

Used within: Button, Document, Checkbox, Link, Radio, Reset, Submit

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