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

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

 

posted @ 2014-12-06 09:55  软件小书童  阅读(1636)  评论(0编辑  收藏  举报