HTML代码:带有图片预览功能的上传表单

带有图片预览功能的上传表单,完整的HTML代码如下所示 html head meta http-equiv="Content-Type" content="text/html; charset=gb2312" title带有图片预览功能的上传表单webjx.com/title script function viewmypic(mypic,imgfile) { if (imgfile.value){ m

带有图片预览功能的上传表单,完整的HTML代码如下所示

<html>      
<head>      
<meta http-equiv=”Content-Type” content=”text/html; charset=gb2312″>      
<title>带有图片预览功能的上传表单webjx.com</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>

给TA打赏
共{{data.count}}人
人已打赏
HTML教程

HTML的一些关于颜色方面的参考

2007-9-2 16:12:00

HTML教程

HTML 和 XHTML的区别

2007-10-5 16:10:00

0 条回复 A文章作者 M管理员
    暂无讨论,说说你的看法吧
个人中心
购物车
优惠劵
有新私信 私信列表
搜索