首页 > 代码库 > 更新数据前jquery如何填充数据到表单域中

更新数据前jquery如何填充数据到表单域中

$("#p_city option[value=http://www.mamicode.com/‘${project.city}‘]").attr("selected","selected");$("#p_projectType option[value=http://www.mamicode.com/‘${project.projectType}‘]").attr("selected","selected");$("#p_voltageLevels option[value=http://www.mamicode.com/‘${project.voltageLevels}‘]").attr("selected","selected");$("#p_successfulSupervisionUnits option[value=http://www.mamicode.com/‘${project.successfulSupervisionUnits}‘]").attr("selected","selected");$("#currentProgress option[value=http://www.mamicode.com/‘${project.currentProgress}‘]").attr("selected","selected");            $("input[name=‘project.whetherExcellence‘][value=http://www.mamicode.com/‘${project.whetherExcellence}‘]").attr("checked",true);$("input[name=‘project.whetherCreatingMobileRed‘][value=http://www.mamicode.com/‘${project.whetherCreatingMobileRed}‘]").attr("checked",true);$("input[name=‘project.whetherDemonstrationProject‘][value=http://www.mamicode.com/‘${project.whetherDemonstrationProject}‘]").attr("checked",true);$("input[name=‘project.peakSummerProject‘][value=http://www.mamicode.com/‘${project.peakSummerProject}‘]").attr("checked",true);$("input[name=‘project.whetherContractTermination‘][value=http://www.mamicode.com/‘${project.whetherContractTermination}‘]").attr("checked",true);$("input[name=‘project.threeRisk‘][value=http://www.mamicode.com/‘${project.threeRisk}‘]").attr("checked",true);$("input[name=‘project.fourRisk‘][value=http://www.mamicode.com/‘${project.fourRisk}‘]").attr("checked",true);                $("#planStart").datepicker();$("#planEnd").datepicker();$("#actualStart").datepicker();$("#completedProfileDeliverDate").datepicker();$("#contractStartTime").datepicker();$("#provincialCompanyStartTime").datepicker();$("#controlnd").datepicker();$("#controlStart").datepicker();

 

更新数据前jquery如何填充数据到表单域中