From c3d83199411f7cf52eeb1bc4dd40345973d90d62 Mon Sep 17 00:00:00 2001 From: IrisVega Date: Tue, 9 Jul 2024 10:05:32 +0800 Subject: [PATCH] modified: date.html modified: script.js --- date.html | 14 +++----------- script.js | 14 ++++++++++++++ 2 files changed, 17 insertions(+), 11 deletions(-) diff --git a/date.html b/date.html index 80a1d34..5aeece4 100644 --- a/date.html +++ b/date.html @@ -5,20 +5,12 @@ 选择日期 + +

你选择的日期为:

No date selected
- + diff --git a/script.js b/script.js index 372e82a..1e4c970 100644 --- a/script.js +++ b/script.js @@ -286,4 +286,18 @@ $(document).ready(function() { sliderValue.text(slider.val()); }); }); +}); +$(document).ready(function() { + $('#closeButton').click(function() { + window.close(); + }); + }); +$(document).ready(function() { + var urlParams = new URLSearchParams(window.location.search); + var dateString = urlParams.get('date'); + if (dateString) { + $('#selectedDate').text(dateString); + } else { + console.warn('No date found in the URL.'); + } }); \ No newline at end of file