1. 已知表单默认是隐藏的,如何通过jquery将表单显示出来?
// $("#form-house-image").show()
2. 已经flask代码 facilities = Facility.query.filter(Facility.id.in_(facility_ids)).all(),Facility对应的表为ih_facility_info,生成的sql语句形式是什么?
// select * from ih_facility_info where id in [facility_id1,facility_id2,facility_id3,....]
3. $(“#form-house-info”).serializeArray()的功能是什么?
// select * from ih_facility_info where id in [facility_id1,facility_id2,facility_id3,....]
4.如何将[{key:value},{key:value}]格式的数据转化为{“key”:“value”,“key”:“value”,…}形式的数据
// var data={}
$("#form-house-info").serializeArray().map(function(x){data[x.name]=x.value})
data就是满足条件的数据
5. 如果将所有选中复选框的value值封装到数组中?
// var facility=[]
$(":checked[name=facility]").each(function(index,item){facility[index]=$(item).val()})