div non selectabel text
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>JavaScript appendChild() Demo</title>
</head>
<body>
<ul id="menu">
</ul>
<script>
function createMenuItem(name) {
let li = document.createElement('li');
li.textContent = name;
return li;
}
// get the ul#menu
const menu = document.querySelector('#menu');
// add menu item
menu.appendChild(createMenuItem('Home'));
menu.appendChild(createMenuItem('Services'));
menu.appendChild(createMenuItem('About Us'));
</script>
</body>
</html>
Also in JavaScript:
- knex insert multiple rows
- how to store and delete s3 image using node js
- add bootstrap to gatsby
- javascript is undefined
- javascript clear text in textarea
- how to update node
- tappify.js
- how to get the number of days in a month in javascript
- Ajax send date to MVC
- what is linter javascript
- Vuejs v-model when enter pressed
- js multi section listbox
- jquery datepicker no past dates
- WHAT IS NODE IN DOM
- What does ~~ (“double tilde”) do in Javascript?
- react native qrcode scanner permission
- remove property from javascript object
- node express table view
- kotlin repeat n times
- json enum string
- js ajax post strings
- react convert excel to json
- jquery script url
- how to get a toggle button to do different js functions