对于那些了解JQuery的人 - 必须努力减少问题 - 我想得到elemenet,它是另一个元素的最后一个子元素(类型为'input',我知道它的ID('myID').
什么是正确的查询: 我试过了:
$("input:last-child", $("#myID"));
$("#myID input:last-child")
Run Code Online (Sandbox Code Playgroud)
但它没有用
尝试:
$("#myID input:last") //for the last
$("#myID input:first") //for the first
Run Code Online (Sandbox Code Playgroud)