Tamaho de fotos
Como fazer com que as fotos que eu carrego fiquem com um tamanho fixo, sem distorção, alguém sabe?Estou enviando mais ou menos o código que estou usando.
<html><head><title>Documento sem título</title><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"></head><script>function troca(){document.getElementById("img1").innerHTML = "<img src=\"file:///"+document.getElementById("caminho").value+"\">";}</script><body><p> </p><p> </p><form action="sava_foto.php" method="post" enctype="multipart/form-data" name="form1"> <p><font color="#000000" size="4"></font></p> <table width="73%" border="0" cellspacing="1" cellpadding="0"> <tr> <td width="67%" height="122"> <input name="txt_foto" type="file" id="caminho" onChange="troca()" size="32" value=""> </td> <td width="33%"><span id="img1"> <table width="50%" border="0" cellspacing="0" cellpadding="0"> <tr> <td bgcolor="#000000"><table width="100%" height="88" border="0" cellpadding="0" cellspacing="1"> <tr> <td height="100" bgcolor="#FFFFFF"><span id="img1"></span></td> </tr> </table></td> </tr> </table> </td> </tr> </table> <p> </p> <p> <input type="submit" name="Submit" value="Enviar"> </p></form><p> </p></body></html>
Discussão (2)
Carregando comentários...