Jquery 具有特定名称和特定形式的输入的选择器

Jquery selector for an input with a specific name and inside a specific form

我想 select 具有 名称 "pass" 的输入,它位于具有 id [=20= 的表单内]

我的想法是不要在此输入中使用 id(显然这会简化我想做的事情)而且我不能 select 的名字,因为我有,在另一种形式中,输入名字为 "pass".

您正在寻找 jQuery attribute equals selector

它准确地选择具有给定值的指定属性的元素。

$('#idreg [name="pass"]')

应该没问题。