javascript add text to li
document.getElementById("p").textContent += " This is the text from javascript.";
<p id ="p">This is the text from HTML.</p>let arr = ["g", "o", "o", "g", "L", "e";
let ul = document.getElementById("id_ul");
let i =0;
arr.map(arr=>{
var li = document.createElement("li");
ul.appendChild(li);
li.innerHTML = arr[i];
})
Also in JavaScript:
- js ternary
- javascript replace all occurrences of string
- value from getelementbyid
- how to display a calender in react native
- javascript find all href with same value
- javascript quick float to integer
- typescript vs javascript
- minify css package.json
- react html symbol code
- lowercase javascript
- not equal to in js
- lodash remove element from array
- on hover display block jquery
- how to execute javascript cde on window rotate
- how to import dotenv in react
- how to get time and date from iso string javascript
- access-control-allow-origin nodejs express
- javascript append how first element
- how to filter an array of objects in javascript
- let in javascript
- ruby json delete key
- how to print an array in javascript
- jquery ready function
- remove prefix js