Dynamic HTML List
Dynamic HTML
List Items and Anchors
List Items
Imagine this Javascript code where we call addRowToList() each time new data is read in:
<script>
var lineCounter= 0;
function addRowToList() {
const list = document.getElementById("thelist");
lineCounter++;
list.innerHTML += `<li>Item ${lineCounter}</li>`;
}
</script>
Anchors
Comments
Post a Comment