Answers for "add image inside a div on specific position javascript"

0

add image inside a div on specific position javascript

function updateDiv(id, width, height, left, top, opacity) 
{ 
    var mydiv = document.getElementById(id);
    mydiv.setAttribute('id', id);  

    mydiv.style.width =  width + "px";     
    mydiv.style.height = height + "px";     

    mydiv.style.position = "absolute"; 
    mydiv.style.left = left + "px";         
    mydiv.style.top = top + "px";  

    mydiv.style.opacity = opacity;
}
Posted by: Guest on September-29-2021

Code answers related to "add image inside a div on specific position javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language