| 系统系 | - 操作系统 - 工具软件 - 病毒安全 - Vista专区 | WEB2.0 | - 奇趣 - 发现分享 - 评论员文章 | 视 频 | - 体育 - 娱乐 - 科技 - 教程 |
| 办公系 | - Word - Excel - Powerpoint - 网站建设 | 动画系 | - Flash - Ascript - Flex - MsE Design 教程 | 编程系 | - Asp - Asp.Net - Php - Jsp、Java - CGI/perl |
| 艺术系 | - 酷赏 - 工业 - 建筑 - 界面 - 平面 - 视觉 | 网站系 | - HTML/Xhtml - Js、Ajax - Css - XML、XSLT | 下 载 | - 图形图像 - 多媒体 - 系统办公 |
带有图片预览功能的上传表单,完整的HTML代码如下所示
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>带有图片预览功能的上传表单it.com.cn</title>
<script>
function viewmypic(mypic,imgfile) {
if (imgfile.value){
mypic.src=imgfile.value;
mypic.style.display="";
mypic.border=1;
}
}
</script>
</head>
<body>
<center>
<form >
<input name="imgfile" type="file" id="imgfile" size="40" onchange="viewmypic(showimg,this.form.imgfile);" />
<br />
</form>
<img name="showimg" id="showimg" src="" style="display:none;" alt="预览图片" />
<br />
</div>
<div style="display:none">
</div>
</center>
</body>
</html>