Website update
This commit is contained in:
parent
e18f4f0f5b
commit
adc78e0931
6 changed files with 186 additions and 108 deletions
14
secret/mineSweeper/counter.js
Normal file
14
secret/mineSweeper/counter.js
Normal file
|
@ -0,0 +1,14 @@
|
|||
'use strict'
|
||||
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
const bombsSlider = document.getElementById('bombs');
|
||||
const bombsValue = document.getElementById('bombsValue');
|
||||
|
||||
// Update the displayed number of bombs when the slider value changes
|
||||
bombsSlider.addEventListener('input', () => {
|
||||
bombsValue.textContent = bombsSlider.value;
|
||||
});
|
||||
|
||||
// Initialize the displayed value on page load
|
||||
bombsValue.textContent = bombsSlider.value;
|
||||
});
|
|
@ -29,6 +29,7 @@
|
|||
value="20"
|
||||
aria-label="Number of Bombs"
|
||||
/>
|
||||
<span id="bombsValue">20</span>
|
||||
|
||||
<button id="startGame">Start Game</button>
|
||||
</div>
|
||||
|
@ -38,5 +39,6 @@
|
|||
</div>
|
||||
|
||||
<script src="script.js"></script>
|
||||
<script src="counter.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -45,7 +45,8 @@ label {
|
|||
}
|
||||
|
||||
input[type="number"],
|
||||
input[type="range"] {
|
||||
input[type="range"],
|
||||
span {
|
||||
padding: 12px;
|
||||
margin-bottom: 20px;
|
||||
width: 100%;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue