Last active
November 7, 2019 17:23
-
-
Save ijash/a51958c46bfa7f45bab3d8098a089386 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//https://playlist.mp3-youtube-converter.org/ | |
let downloadForm = document.querySelector('table'); | |
let checkBoxes = downloadForm.querySelectorAll(`[type*="checkbox"]`); | |
let startArr = parseInt(prompt('select starting number', 'INPUT NUMBER ONLY!')); | |
let limitArr = 20; | |
let countArr = limitArr; | |
countArr = startArr + countArr | |
countArr = (countArr > checkBoxes.length ? checkBoxes.length - startArr : limitArr-1); | |
// check | |
for (let i = startArr - 1; i < (countArr+startArr); i++) { | |
checkBoxes[i].checked = true; | |
}; | |
// uncheck | |
for (let i = startArr - 1; i < (countArr+startArr); i++) { | |
checkBoxes[i].checked = false; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment