<td class="tdLabel"><label class="label">生日:</label>
<input size="15" class="Wdate" value="${patient.birthday}" type="text" onClick="WdatePicker()" onChange="javascript:compute();" name="patient.birthday" id="patient.birthday"/></td>
<td class="tdLabel"><label class="label">年龄:</label>
<input type="text" size="4" readonly="readonly" name="patient.age" id="patient.age" value="${patient.age}"/>岁</td>
function compute(){
var birth= $('patient.birthday').value.substr(0,4);var thisYear = new Date().getFullYear();
birth = birth.substr(0,4);
$('patient.age').value = thisYear-birth;
}