Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion 2 2-ui/2-events/04-default-browser-action/article.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ or
- 许多人喜欢使用“右键单击” —— “在一个新窗口打开链接”。如果我们使用 `<button>` 或 `<span>`,这个效果就无法实现。
- 搜索引擎在建立索引时遵循 `<a href="...">` 链接。

因为我们在标记(markup)中使用了 `<a>`。但通常我们打算处理 JavaScript 中的点击。因此,我们应该阻止浏览器默认行为。
所以我们在标记(markup)中使用了 `<a>`。但通常我们打算处理 JavaScript 中的点击。因此,我们应该阻止浏览器默认行为。

像这样:

Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.