Html 当我搜索表单标记时,queryselector显示错误的长度

Html 当我搜索表单标记时,queryselector显示错误的长度,html,dom,find,selectors-api,Html,Dom,Find,Selectors Api,当我从html中使用querySelector找到“表单标签”时,它显示长度为2。 取而代之的是显示1 querySelector返回错误的长度值 我猜表单有两个字段?似乎返回了表单子项。document.querySelectorAll('form')。length-返回正确值,有趣的…:)是的,表单有两个字段。我使用的是QuerySelector,表单有两个字段,我猜?似乎返回了表单子项。document.querySelectorAll('form')。length-返回正确值,有趣的…:

当我从html中使用querySelector找到“表单标签”时,它显示长度为2。 取而代之的是显示1

querySelector返回错误的长度值


我猜表单有两个字段?似乎返回了表单子项。document.querySelectorAll('form')。length-返回正确值,有趣的…:)是的,表单有两个字段。我使用的是QuerySelector,表单有两个字段,我猜?似乎返回了表单子项。document.querySelectorAll('form')。length-返回正确值,有趣的…:)是的,表单有两个字段。我正在使用querySelector