1-js/02-first-steps/09-alert-prompt-confirm#53
Merged
leviding merged 8 commits intojavascript-tutorial:zh-hansfrom Apr 23, 2018
HydeSong:translate/09-alert-prompt-confirm
Merged
1-js/02-first-steps/09-alert-prompt-confirm#53leviding merged 8 commits intojavascript-tutorial:zh-hansfrom HydeSong:translate/09-alert-prompt-confirm
leviding merged 8 commits intojavascript-tutorial:zh-hansfrom
HydeSong:translate/09-alert-prompt-confirm
Conversation
Contributor
|
@leviding 校对认领 |
Starriers
reviewed
Apr 23, 2018
| @@ -1,48 +1,48 @@ | |||
| # Interaction: alert, prompt, confirm | |||
| # 交互:alert, prompt,confirm | |||
| # 交互:alert, prompt,confirm | ||
|
|
||
| This part of the tutorial aims to cover JavaScript "as is", without environment-specific tweaks. | ||
| 本部分旨在覆盖 JavaScript “原样”,而无需针对特定环境进行调整。 |
| ``` | ||
|
|
||
| This shows a message and pauses the script execution until the user presses "OK". | ||
| 浏览器会弹出一段信息并暂停脚本,直到用户点击了 “确定”。 |
| ``` | ||
|
|
||
| The mini-window with the message is called a *modal window*. The word "modal" means that the visitor can't interact with the rest of the page, press other buttons etc, until they have dealt with the window. In this case -- until they press "OK". | ||
| 这个小窗口被称为 *模态窗*。“modal” 意味着用户不能与页面的其他部分进行交互,按其他按钮等,直到他们处理完窗口。 在这种情况下 - 直到他们按下“确定”。 |
| ``` | ||
|
|
||
| The mini-window with the message is called a *modal window*. The word "modal" means that the visitor can't interact with the rest of the page, press other buttons etc, until they have dealt with the window. In this case -- until they press "OK". | ||
| 这个小窗口被称为 *模态窗*。“modal” 意味着用户不能与页面的其他部分进行交互,按其他按钮等,直到他们处理完窗口。 在这种情况下 - 直到他们按下“确定”。 |
| 2. 窗口的确切外观还取决于浏览器。 我们不能修改它。 | ||
|
|
||
| That is the price for simplicity. There are other ways to show nicer windows and richer interaction with the visitor, but if "bells and whistles" do not matter much, these methods work just fine. | ||
| 这是简单的代价。 还有其他一些方法可以显示更漂亮的窗口,并与用户进行更丰富的交互,但如果“花里胡哨”不重要,这些方法就可以正常工作。 |
Contributor
There was a problem hiding this comment.
不重要=>不是非常重要 就可以正常工作=》也可以工作的很好
| 2. 窗口的确切外观还取决于浏览器。 我们不能修改它。 | ||
|
|
||
| That is the price for simplicity. There are other ways to show nicer windows and richer interaction with the visitor, but if "bells and whistles" do not matter much, these methods work just fine. | ||
| 这是简单的代价。 还有其他一些方法可以显示更漂亮的窗口,并与用户进行更丰富的交互,但如果“花里胡哨”不重要,这些方法就可以正常工作。 |
|
|
||
| 1. The exact location of the modal window is determined by the browser. Usually it's in the center. | ||
| 2. The exact look of the window also depends on the browser. We can't modify it. | ||
| 1. 模态窗口的确切位置由浏览器决定。 通常它在页面中心。 |
| 1. The exact location of the modal window is determined by the browser. Usually it's in the center. | ||
| 2. The exact look of the window also depends on the browser. We can't modify it. | ||
| 1. 模态窗口的确切位置由浏览器决定。 通常它在页面中心。 | ||
| 2. 窗口的确切外观还取决于浏览器。 我们不能修改它。 |
| ``` | ||
|
|
||
| The mini-window with the message is called a *modal window*. The word "modal" means that the visitor can't interact with the rest of the page, press other buttons etc, until they have dealt with the window. In this case -- until they press "OK". | ||
| 这个小窗口被称为 *模态窗*。“modal” 意味着用户不能与页面的其他部分进行交互,按其他按钮等,直到他们处理完窗口。 在这种情况下 - 直到他们按下“确定”。 |
Contributor
Author
|
已根据校对者意见修改 @leviding @Starriers |
leviding
requested changes
Apr 23, 2018
| @@ -1,9 +1,8 @@ | |||
| importance: 4 | |||
| 重要:4 | |||
| ``` | ||
|
|
||
| The mini-window with the message is called a *modal window*. The word "modal" means that the visitor can't interact with the rest of the page, press other buttons etc, until they have dealt with the window. In this case -- until they press "OK". | ||
| 这个小窗口被称为 **模态窗**。“modal” 意味着用户不能与页面的其他部分进行交互,点击其他按钮等,直到他们处理完窗口。在这种情况下 - 直到他们按下“确定”。 |
|
|
||
| `default` | ||
| : An optional second parameter, the initial value for the input field. | ||
| :可选的第二个参数,指定 input 框的初始值。 |
|
|
||
| `title` | ||
| : The text to show to the visitor. | ||
| :显示给用户的文本 |
|
|
||
| `alert` | ||
| : 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, all browsers return `null`. | ||
| :显示信息要求用户输入文本。点击确定返回文本,或者点击取消或按下 `key:Esc` 键,对于所有浏览器来说,其返回值都是。 |
|
|
||
| `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`. | ||
| :显示信息等待用户点击确定或取消。点击确定返回 `true`,点击取消或 `key:Esc` 键返回 `false`。 |
Contributor
Author
|
@leviding 已修改 |
leviding
approved these changes
Apr 23, 2018
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
翻译完成 resolve #9