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.
我有一个动态添加的表,并且想在表中添加行。我曾经使用$("#tbl1 tr:last").after()添加行。出于某种原因,它以未定义的形式返回。
$("#tbl1 tr:last").after()
我改为使用$("#tbl1").children("tr:last")并且有效?不确定这是否真的是正确的方法,但它确实有效。
$("#tbl1").children("tr:last")
为什么第一个选项不起作用的任何原因?