modified: date.html
modified: script.js
This commit is contained in:
parent
326d3f592d
commit
c3d8319941
14
date.html
14
date.html
@ -5,20 +5,12 @@
|
|||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<title>选择日期</title>
|
<title>选择日期</title>
|
||||||
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
|
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
|
||||||
|
<link rel="stylesheet" href="styles.css">
|
||||||
</head>
|
</head>
|
||||||
<body background="./bg.png" style="background-size:100% 100%; background-attachment: fixed;">
|
<body background="./bg.png" style="background-size:100% 100%; background-attachment: fixed;">
|
||||||
|
<button id="closeButton">x</button>
|
||||||
<h3>你选择的日期为:</h3>
|
<h3>你选择的日期为:</h3>
|
||||||
<div id="selectedDate">No date selected</div>
|
<div id="selectedDate">No date selected</div>
|
||||||
<script>
|
<script src="script.js"></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>
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
14
script.js
14
script.js
@ -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.');
|
||||||
|
}
|
||||||
|
});
|
Loading…
Reference in New Issue
Block a user