jQuery查找子元素与后代元素

1. 子元素:

$().children('选择器')  如选择type为file的子元素  $(this).children("input[type=file]")

或者

$("#p >s")

 

2. 后代元素

 

$().children('选择器')  如选择type为file的所有后代元素  $(this).find("input[type=file]")

或者

$("#p s")

posted @ 2016-05-24 16:56  南无  阅读(4614)  评论(0编辑  收藏  举报