modified: date.html

modified:   script.js
This commit is contained in:
IrisVega 2024-07-09 10:05:32 +08:00
parent 326d3f592d
commit c3d8319941
2 changed files with 17 additions and 11 deletions

View File

@ -5,20 +5,12 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>选择日期</title>
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<link rel="stylesheet" href="styles.css">
</head>
<body background="./bg.png" style="background-size:100% 100%; background-attachment: fixed;">
<button id="closeButton">x</button>
<h3>你选择的日期为:</h3>
<div id="selectedDate">No date selected</div>
<script>
$(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.');
}
});
</script>
<script src="script.js"></script>
</body>
</html>

View File

@ -287,3 +287,17 @@ $(document).ready(function() {
});
});
});
$(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.');
}
});