图片的上传和浏览

来源:互联网 发布:韩世远合同法总论知乎 编辑:程序博客网 时间:2024/06/10 21:54

 function   test(){  
   document.all.showimg.src=document.all.file1.value;  
    
   } 

 

<table border="0" class="perview">
 <tr>
   <th WIDTH="110">实验室示意图:</th>
   <th width="50%">预览图</th>
  </tr>
  <tr>
   <td align="center" height="400" WIDTH="200"><input id="file1" name="bean.labImg" type="file" onchange="test()" /></td>
   <td align="center" height="400" WIDTH="400"><img id="showimg" src="${imageadd?if_exists}" /></td>
  </tr>
 
</table>
原创粉丝点击