skip to Main Content

Javascript alert the rest of the row content using a checkbox

I have code currently where I can output the value inside the selected checkboxes: <button name="save_multicheckbox" class="btn-primary" onClick="getCheckbox()">Save Checkbox</button> function getCheckbox() { var checks = document.getElementsByClassName('checks'); var id_value = ''; for ( i=0; i<4; i++) { if (checks[i].checked === true){…

VIEW QUESTION

Optimized JavaScript Random Strings With Key-Value Pairs/For Loop

var crustType = ["wheat", "hand tossed", "deep dish"]; var crustTypeArr = crustType[Math.floor(Math.random() * crustType.length)]; var sauceType = ["marinara", "tomato", "none"]; var sauceTypeArr = sauceType[Math.floor(Math.random() * sauceType.length)]; var cheeses = ["mozarella", "cheddar", "feta"]; var chessesArr = cheeses[Math.floor(Math.random() * cheeses.length)]; var toppings…

VIEW QUESTION
Back To Top
Search