if ($("input[name = 'recpower']").prop("checked") == true) //获取checkbox值 { data.recpower = '开启' } else { data.recpower = '关闭' };
if (data.recpower == "开启") //设置checkbox的值 { $("input[name = 'recpower']").prop("checked", "checked")};
if ($("select[name = 'lv']").val() == '0') //获取select的值 { data.lv = '店员'; } else { data.lv = '店长'; };
if (data.lv == "店长" ) //设置select的值 { $("option[name = 'lv-clk']").prop("selected","selected"); } else { $("option[name = 'lv-buinour']").prop("selected","selected") };