Formulário de upload com a função de visualização de imagem, o código HTML completo é o seguinte
<html>
<head>
<meta http-equiv = content-type content = text/html; charset = gb2312>
<title> Formulário de upload com função de visualização de imagem Cuoxin.com </ititle>
<Cript>
função viewMypic (mypic, imgfile) {
if (imgfile.value) {
mypic.src = imgfile.value;
mypic.style.display =;
mypic.border = 1;
}
}
</script>
</head>
<Body>
<Center>
<morm>
<nome de entrada = imgfile type = ID do arquivo = tamanho imgfile = 40 onchange = ViewMyPic (showImg, this.form.imgfile); />
<br />
</morm>
<img name = showImg id = showImg src = style = display: nenhum; alt = visualizar imagem/
<br />
</div>
<div style = display: nenhum>
</div>
</central>
</body>
</html>