当点击label标签时,能够选中与其对应的输入框,有2种方式,采用第一种时会产生太多的id,推荐第二种。

<form action="03.php">
	<label for="user">userName:</label>
	<input type="text" ><br>
	<label>password:<input type="password"></label>
</form>

点击label时text输入框被选中

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-02-07
  • 2022-02-07
猜你喜欢
  • 2022-12-23
  • 2021-06-30
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案