From 39cd446b1a25a28b5aa47c5613f8d2b60376e925 Mon Sep 17 00:00:00 2001 From: Dauren777 Date: Mon, 1 Jun 2026 10:36:57 +0000 Subject: [PATCH] =?UTF-8?q?v6=20=E2=80=94=20=D0=B2=D0=BE=D0=B7=D1=80=D0=B0?= =?UTF-8?q?=D1=81=D1=82=20=D1=81=D1=87=D0=B8=D1=82=D0=B0=D0=B5=D1=82=D1=81?= =?UTF-8?q?=D1=8F=20=D0=B0=D0=B2=D1=82=D0=BE=D0=BC=D0=B0=D1=82=D0=B8=D1=87?= =?UTF-8?q?=D0=B5=D1=81=D0=BA=D0=B8=20=D0=BF=D0=BE=20=D0=B4=D0=B0=D1=82?= =?UTF-8?q?=D0=B5=20=D1=80=D0=BE=D0=B6=D0=B4=D0=B5=D0=BD=D0=B8=D1=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.html | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/index.html b/index.html index 1355ab8..7e30fad 100644 --- a/index.html +++ b/index.html @@ -166,8 +166,8 @@ input[type=file]{display:none} > - - + +
@@ -395,6 +395,17 @@ function registerProfile() { loginProfile(profile.id); } +function calcAge() { + const b = document.getElementById('regBirth').value; + if (!b) return; + const birth = new Date(b); + const today = new Date(); + let age = today.getFullYear() - birth.getFullYear(); + const m = today.getMonth() - birth.getMonth(); + if (m < 0 || (m === 0 && today.getDate() < birth.getDate())) age--; + document.getElementById('regAge').value = age; +} + function previewRegPhoto() { const f = document.getElementById('regPhoto').files[0]; if (!f) return;