duplicate images in webpage js
<div id="list"><img id="item" src = "picture.jpg"></div>
<script type="text/javascript">
function cloneItem() {
var item = document.getElementById("item");
var list = document.getElementById("list");
var clonedItem = item.cloneNode(true);
list.appendChild(clonedItem);
}
for(var i = 0; i < 5; i++) {
cloneItem();
}
</script>
Also in JavaScript:
- load external javascript from console
- javascript mouse drag coordinates
- javascript find directory root
- get href attribute javascript
- make random letter capital in string javascript
- react select options
- express js example
- how to use json stringify in javascript
- js remove readonly attribute
- template literals javascript
- check for string in string javascript
- Javascript get element height and width
- float to euro curency
- webpack css not shoud be empty
- indexing string in javascript
- django regular expression
- react native dropdown
- detect scroll javascript
- javascript getcontext
- loopback before save
- difference between key and code in javascript
- react native image not working ios 14
- js combine two arrays
- three.js create sphere