add checkbox dynamically in javascript
$(document).ready(function() {
$('#submit').click(function() {
var list = ['Car', 'Bike', 'Scooter'];
for (var value of list) {
$('#container')
.append(`<input type="checkbox" id="${value}" name="interest" value="${value}">`)
.append(`<label for="${value}">${value}</label></div>`)
.append(`<br>`);
}
})
});
Also in JavaScript:
- how to find out which version of React
- generate random number javascript
- create function javascript
- java script functions
- react function exec when button is clicked
- nextjs "mssql" server
- Javascript remove array item by value
- javascript for loop over dictionary
- draw rectangle on javascript canvas
- javascript vérifier si une chaine de carctère commence par une majuscule
- closures in javascript
- cli run js
- javascript get index
- atob nodejs
- use bootstrap in react
- js alert
- jquery select specific radio button by value
- jquery autocomplete database
- eslint version check in react
- GET req with js
- .filter js
- showing file download progress in angular
- componentWillUnmount functional component for asynchronous requests
- display json data in html table using javascript dynamically