Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
私はこれを使用しています:
$(this).closest('tr').next()
を選択するtable rowには、このtrの後に指定されたIDを持つtrも選択する必要があります。
table row
私はそれをこのようにしようとしました:
var a = $(this).closest('tr').next() var b = $(a).closest('#itemrow').next()
var aは正常に動作していますが、を選択しませんvar b。
var a
var b
何が問題なの?
var a = $(this).closest('tr').nextAll('#itemrow:first')
私はあなたがこれをすればそれはうまくいくと思います
var a = $(this).closest('tr').next() var b = a.closest('#itemrow').next()
aはすでにjqueryオブジェクトであり、$()で囲まないでください