fix type fforget
This commit is contained in:
parent
9add0b1c88
commit
b792cf9cd0
1 changed files with 1 additions and 1 deletions
|
@ -48,7 +48,7 @@ For instance, to assign a `click` handler for an `input`, we can use `onclick`,
|
||||||
|
|
||||||
On mouse click, the code inside `onclick` runs.
|
On mouse click, the code inside `onclick` runs.
|
||||||
|
|
||||||
Please note that inside `onclick` we use single quotes, because the attribute itself is in double quotes. If we fforget that the code is inside the attribute and use double quotes inside, like this: `onclick="alert("Click!")"`, then it won't work right.
|
Please note that inside `onclick` we use single quotes, because the attribute itself is in double quotes. If we forget that the code is inside the attribute and use double quotes inside, like this: `onclick="alert("Click!")"`, then it won't work right.
|
||||||
|
|
||||||
An HTML-attribute is not a convenient place to write a lot of code, so we'd better create a JavaScript function and call it there.
|
An HTML-attribute is not a convenient place to write a lot of code, so we'd better create a JavaScript function and call it there.
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue