2011-08-21 130 views
-1

我正在嘗試使用圖像標籤在我的JSP頁面上顯示圖像。我可否知道我應該使用什麼標籤格式?我已將我的圖像存儲在我的項目的「圖像」文件夾下。在JSP頁面中顯示圖像

回答

4

退房

<html> 
<body> 

<img src="angry.gif" alt="Angry face" width="32" height="32" /> 

</body> 
</html> 

http://www.w3schools.com/tags/tryit.asp?filename=tryhtml_image_test

你可能需要 SRC = 「/ yourcontextroot /資源/圖像/ yourpic.gif」

+2

你可能需要的src =「「。對上下文根進行硬編碼是一個非常糟糕的主意。 –