I have an image and a% div of%.
By clicking on the image it has to be copied to the div conteudo-img
, which methods can I use to make this copy and which is the most viable via javaScript .
#images{
float:left;
}
#conteudo-img{
width: 300px;
height: 300px;
border: 1px solid #f1f;
float: left;
}
<html>
<body>
<div id="images">
<img src="https://orig00.deviantart.net/d61c/f/2015/256/c/7/dipper_ice_cream_splat_icon___free_to_use_by_icelemontea83-d99f4z7.gif"><br><imgsrc="https://orig00.deviantart.net/d61c/f/2015/256/c/7/dipper_ice_cream_splat_icon___free_to_use_by_icelemontea83-d99f4z7.gif"><br><imgsrc="https://orig00.deviantart.net/d61c/f/2015/256/c/7/dipper_ice_cream_splat_icon___free_to_use_by_icelemontea83-d99f4z7.gif"><br><imgsrc="https://orig00.deviantart.net/d61c/f/2015/256/c/7/dipper_ice_cream_splat_icon___free_to_use_by_icelemontea83-d99f4z7.gif"><br>
</div>
<div id="conteudo-img"> </div>
</body>
</html>
#images{
float:left;
}
#conteudo-img{
width: 300px;
height: 300px;
border: 1px solid #f1f;
float: left;
}
<div id="random_id">
<div class="img">
<img src="https://orig00.deviantart.net/d61c/f/2015/256/c/7/dipper_ice_cream_splat_icon___free_to_use_by_icelemontea83-d99f4z7.gif"><br></div><divclass="img">
<img src="https://orig00.deviantart.net/d61c/f/2015/256/c/7/dipper_ice_cream_splat_icon___free_to_use_by_icelemontea83-d99f4z7.gif"><br></div><divclass="img">
<img src="https://orig00.deviantart.net/d61c/f/2015/256/c/7/dipper_ice_cream_splat_icon___free_to_use_by_icelemontea83-d99f4z7.gif"><br></div><divclass="img">
<img src="https://orig00.deviantart.net/d61c/f/2015/256/c/7/dipper_ice_cream_splat_icon___free_to_use_by_icelemontea83-d99f4z7.gif"><br></div></div><divid="conteudo-img"> </div>