问题
I know how to insert an image using add image avaible on Layout Panel or using HTML.
However I want to make a condition : If the image is not avaible or doesn't exist, there is a default image I want to display.
So I think I need to do it with js function. What is the best way for it?
回答1:
you can use image tag in html for that.
<img id="img" src="SomeImage.jpg" onerror="this.onerror=null; this.src=default.png" alt="" width="100" height="120">
来源:https://stackoverflow.com/questions/57678223/how-to-insert-an-image-on-pentaho-dashboard-with-condition