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

第 43 期(W3C标准-HTML):快捷键 #46

Copy link
Copy link
@wingmeng

Description

@wingmeng
Issue body actions

题目:

请根据提供的 html 代码实现下述效果:

  • 点击按钮或按快捷键 Alt + H,控制台输出对应信息;
  • 点击或按快捷键 Alt + Y 选中“同意”单选框;
  • 点击或按快捷键 Alt + N 选中“不同意”单选框。
<button onclick="console.log('这是帮助信息')">帮助信息</button>
<label>
  <input type="radio" name="choice"> 同意
</label>
<label>
  <input type="radio" name="choice"> 不同意
</label>

参考答案:

<button accesskey="h" onclick="console.log('这是帮助信息')">帮助信息</button>
<label accesskey="y">
  <input type="radio" name="choice"> 同意
</label>
<label accesskey="n">
  <input type="radio" name="choice"> 不同意
</label>

Element accesskey

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

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