input选中 和 select点击下拉选择获取选中选项的值
1.input选中
$('#checkBox').find('input').each(function(i){ if($(this).prop('checked')){//获取是否选中 并判断 $(this).prop('checked', false); //修改设置为不选中状态 }else{ $(this).prop('checked', true);//修改设置为选中状态 } });
2.select点击下拉选择获取选中选项的值$('#demo').change(function(){varcon = $(this).html();$('#item').html(con);
});

浙公网安备 33010602011771号