Skip to content

Commit da6e6d1

Browse files
committed
Several fixes for Chapter 18
Spotted by Aaron Lin
1 parent bbfb5ba commit da6e6d1

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

18_forms.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ name).
251251

252252
(((button (HTML tag))))(((type attribute)))(((submit)))(((Enter
253253
key)))A button with a `type` attribute of `submit` will, when pressed,
254-
cause the form to be submitted. Pressing Enter in when a form field is
254+
cause the form to be submitted. Pressing Enter when a form field is
255255
focused has the same effect.
256256

257257
(((submit event)))(((event handling)))(((preventDefault
@@ -332,7 +332,7 @@ with an event handler that, when you press F2, inserts the string
332332
// Put the cursor after the word
333333
field.selectionStart = field.selectionEnd =
334334
from + word.length;
335-
};
335+
}
336336
</script>
337337
----
338338

@@ -622,7 +622,7 @@ password and a website name.
622622

623623
(((persistence)))(((memory)))When such an application needs to
624624
remember something between sessions, you cannot use JavaScript
625-
((variable)) since those are thrown away every time a page is
625+
((variable))s since those are thrown away every time a page is
626626
closed. You could set up a server, connect it to the Internet, and
627627
have your application store something there. We will see how to do
628628
that in link:20_node.html#node[Chapter 20]. But this adds a lot of

0 commit comments

Comments
 (0)