Visitar URL original
第 43 期(W3C标准-HTML):快捷键 · Issue #46 · fezaoduke/fe-practice-hard · GitHub
Skip to content

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

Description

@wingmeng

题目:

请根据提供的 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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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