1.html
<IMG:SRC = "imgShow(imgUrl)" />
2.js
//表示画像、通常の表示画像であれば、しない場合は、デフォルトの画像
データ()
imgUrl: ''、
mothods:
imgShow:機能(データ){ REG = / ^(HTTPS:| HTTP:)させ/ G; IF(データ){ IF(reg.test(データ)){ 戻りデータ; }他{ リターン「http://192.168.0.176:8888/assets/img/item4.png」。 } }他{ リターン'http://192.168.0.176:8888/assets/img/404.png'。 } }