让 <label> 点击时聚焦到对应输入框,正确做法是?

前端基础

  1. A.label 与 input 放在同一 div 内即可
  2. B.label 的 name 与 input 的 name 相同
  3. C.label 的 for 属性值等于 input 的 id(或直接用 label 包裹 input)
  4. D.给 label 加 onclick 调用 input.focus() 是唯一方法