js 上传图片预览
来源:互联网 发布:安卓看图软件 编辑:程序博客网 时间:2024/06/07 21:58
<script language='javascript'> function show(){ var p=document.getElementById("file1").value; document.getElementById("s").innerHTML="<input type=image id=pic width=150 height=100 /> "; document.getElementById("pic").src=p; //alert(p); } </script>
<input type="file" name="file1" id="file1" onpropertychange="show();" /> <span id="s"></span>