這是html的代碼
<tr> <th>上傳頭像:</th>
<td><input type="file" name="img" accept="image/*"></td>
</tr>
這是Severlet代碼:
out.println("<tr><th>頭像:</th>");
String img = request.getParameter("img");
out.println("<td><img src='"+request.getContextPath()+"/images/" + img + "'width=\\\"200px\\\" hight=\\\"200px\\\"/></td></tr>");
圖片顯示不出來
初學JavaWeb!求大神指教!!感激不盡
轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/105829.html
標籤:Web 開發
上一篇:求幫忙關于java
