Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wingmeng opened this issue Jun 27, 2019 · 0 comments
Open

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

wingmeng opened this issue Jun 27, 2019 · 0 comments

Comments

@wingmeng
Copy link
Collaborator

wingmeng commented Jun 27, 2019

题目:

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant