Image on Load

Auto loaded Image will appear here

What I want to do is to have the image above load from a list of images.

I also want to be able to change the title, size and possibly the click action

Top

I don't want to use the onload() method as this would interfere with the keyhandler.

Making a search for how to use Javascript to load an image returned a few sugestions. There is a script below the uses an onload method that appends a child element img to the body element

Another example - using the create new Image() object

Image will appear here

Auto load - The image has been moved to the top of the page - as it would be on the index page.

The index of the array is hard=coded [4]

Links

Link to PDF Disabled

If you require a copy please email tempusfugit.me.uk

Top

References -

  • 1 - Javascript: Load an Image from url and display - https:// stackoverflow.com/questions/ 17634019/ javascript-load-an-image-from-url-and-display
  • 2 - How to Load Image From URL in JavaScript - https://www.delftstack.com/howto/javascript/javascript-load-image-from-url/
  • 3 - HTMLImageElement: Image() constructor - https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/Image