Jquery——each遍历

$("input").each(function(index){
    // index 当前元素的下标
    c = $(this).val();  //当前val
    demo = $("input").eq(index).val();  //通过index获取指定元素的val eq(1)  获取第一个li
});

猜你喜欢

转载自www.cnblogs.com/coder1013/p/12895497.html