Inputting a default image in case the src attribute of an html

后端 未结 22 2466
渐次进展
渐次进展 2020-11-22 16:02

Is there any way to render a default image in an HTML tag, in case the src attribute is invalid (using only HTML)? If not, what would

22条回答
  •  天涯浪人
    2020-11-22 16:15

    If you have created dynamic Web project and have placed the required image in WebContent then you can access the image by using below mentioned code in Spring MVC:

    Refresh
    

    You can also create folder named img and place the image inside the folder img and place that img folder inside WebContent then you can access the image by using below mentioned code:

    Refresh
    

提交回复
热议问题