minor fix

In the browser, the button to cancel has been labeled with `Cancel` not `CANCEL`
This commit is contained in:
Violet.Lee 2019-07-09 14:50:00 +09:00 committed by GitHub
parent 0e3c4263d7
commit c8d3fb78d0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -30,7 +30,7 @@ The function `prompt` accepts two arguments:
result = prompt(title, [default]);
```
It shows a modal window with a text message, an input field for the visitor, and the buttons OK/CANCEL.
It shows a modal window with a text message, an input field for the visitor, and the buttons OK/Cancel.
`title`
: The text to show the visitor.
@ -38,7 +38,7 @@ It shows a modal window with a text message, an input field for the visitor, and
`default`
: An optional second parameter, the initial value for the input field.
The visitor may type something in the prompt input field and press OK. Or they can cancel the input by pressing CANCEL or hitting the `key:Esc` key.
The visitor may type something in the prompt input field and press OK. Or they can cancel the input by pressing Cancel or hitting the `key:Esc` key.
The call to `prompt` returns the text from the input field or `null` if the input was canceled.
@ -74,7 +74,7 @@ The syntax:
result = confirm(question);
```
The function `confirm` shows a modal window with a `question` and two buttons: OK and CANCEL.
The function `confirm` shows a modal window with a `question` and two buttons: OK and Cancel.
The result is `true` if OK is pressed and `false` otherwise.
@ -94,10 +94,10 @@ We covered 3 browser-specific functions to interact with visitors:
: shows a message.
`prompt`
: shows a message asking the user to input text. It returns the text or, if CANCEL or `key:Esc` is clicked, `null`.
: shows a message asking the user to input text. It returns the text or, if Cancel button or `key:Esc` is clicked, `null`.
`confirm`
: shows a message and waits for the user to press "OK" or "CANCEL". It returns `true` for OK and `false` for CANCEL/`key:Esc`.
: shows a message and waits for the user to press "OK" or "Cancel". It returns `true` for OK and `false` for Cancel/`key:Esc`.
All these methods are modal: they pause script execution and don't allow the visitor to interact with the rest of the page until the window has been dismissed.