i want to load a picture form input type image and desplay it on my html page or at least get the path of that image
<script>
function AddImg()
{
const img = document.getElementById("image").value;
console.log(text);
var myImage = new Image(100, 200);
myImage.src =img ;
document.body.appendChild(myImage);
}
</script>
<input type="file" accept="image/*" value="Add Images" style="margin-top: 30px;" id="image">
<button onclick="AddImg();">Add image</button>