Home >Web Front-end >JS Tutorial >javascript Firefox (firefox) does not display local images problem solution_image special effects
<script> function fileChange(obj) { var url = obj.value url = "file:///" url.replace("\",'/'); alert(url); document.getElementById("img1").src= url; } </script>
关键是:url = "file:///" url.replace("\",'/');