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">
|
||||
<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>
|
||||
|
14
script.js
14
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.');
|
||||
}
|
||||
});
|
Loading…
Reference in New Issue
Block a user