<!DOCTYPE html>
<html>
<head>
<style>
body {
background-color: rgba(113, 182, 142, 0.61);
}
</style>
</head>
<body>
<input type="file" accept="image/*" id="filePut"/>
<button id="send">Start</button>
<img src="" id="image"/>
<script>
// Variables.
var put = document.getElementById("filePut");
var start = document.getElementById("send");
var img = document.getElementById("image");
// The send function.
function onSend(){
img.src = put.value.replace("C:\\fakepath\\", "");
img.src = put.value;
}
// Call the function.
start.addEventListener("click", onSend, false);
</script>
</body>
</html>
Error: net::ERR_FILE_NOT_FOUND
I tried removing the fake path, but it wont work. Is there any reason?
If you send the fixed code, then thanks. :p