El codigo es mas o menos este:
Código HTML:
<script language="javascript1.2"> function changeimg(xfile){ document.getElementById('img1').src=xfile.value; } </script> <img id="img1" src="demo.jpg" onmouseover="style.cursor='hand';" onclick="document.formupthumbs.file1.click()" > <form action="uploadthumbs.php" method="post" name="formupthumbs" enctype="multipart/form-data"> <input type="file" name="file1" style="display:none" accept="image/jpeg" onchange="changeimg(this)"> <input type="submit" value="Agregar thumbs"></form>