•onClick="alert
('You clicked the button!');"
•The underlined parts are HTML
•The quoted string is JavaScript
•onClick
–The Java naming convention is easier to
read.
–This is fine in HTML, but an error
if it occurs in JavaScript. JavaScript is case sensitive. HTML is not
.
•Please note: Since we have a
quoted string
inside another quoted string, we need both single and double quotes.