Js替換字符串中img標籤

str = 'abcd<img src="images/01.gif">asdasd<img src="images/02.gif">fsfasd';
str=str.replace(/<\s?img[^>]*>/gi, '【圖片】');
相關文章
相關標籤/搜索