How to bypass 404 File not Found Error Using Try Catch (Pure JavaScript)

前端 未结 0 854
臣服心动
臣服心动 2020-12-30 20:40

Hello I want to load images into an src tag but the provided URL can be empty and I want to account for that case and instead use a default image instead.

I have this

相关标签:
回答
  • 消灭零回复
提交回复
热议问题