javascript通过el计算年龄

1
2
3
4
5
6
<scripttype="text/javascript">
varnowdate =newDate();
varbrithday ="${sepeList.birthDate}";
varage =nowdate.getFullYear() - brithday.substr(0,4);
document.write(age);
</script>
el