I want to display an image on screen, but define the link to the image in my js script, like so:
<script>
function myFunction() {
var imgUrl = "https://www.linkpicture.com/q/IMG_4902"
var modelName = "Model Name"
document.getElementById("myText").innerHTML = modelName;
}
</script>
<body onload="myFunction()">
<div class="image-area">
<div class="img-wrapper">
<img src="" id="myImg" alt="">
so in the img src, I want to display the image based on the imgUrl content in my script. How is this possible?