Jump to content

Download image from url and show it


omid_student

Recommended Posts

Simply setting the src attribute of an <img> element will make it display.

// Create the imagevar img = document.createElement("img");// Set the file nameimg.src = "a.jpg"// Add it to an elementdocument.body.appendChild(img);
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...