<button id="test" name="test_name" value="test_value"></button>

上面是一个在前端页面中展示的一个button,通过点击button获得相应的value

$('#test').attr('name')

得到结果

test_name

相关文章:

  • 2021-06-11
  • 2022-12-23
  • 2022-12-23
  • 2021-11-29
  • 2022-01-08
  • 2021-08-21
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-01-31
  • 2021-12-30
  • 2021-08-27
  • 2022-12-23
  • 2021-09-22
相关资源
相似解决方案