JSFiddle - React, Tailwind, and code Playground

by Qwerty_Wasd

HTML

<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
</head>
<body>
	<input value="Нажми меня" type="button" id="add-nodes">
	<ul id="list"></ul>
	<script>
		document.getElementById(`add-nodes`).addEventListener(`click`, () => {
			let count = (document.getElementsByClassName(`item`).length + 1) || 1;
			for(let i = count; i < count + 3; i++) {
            	document.getElementById(`list`).insertAdjacentHTML(`beforeend`,`<li class="item"><a href="#">${i}</a></li>`);
          	}
		});
	</script>
</body>
</html>