try
{  
   var str='<P>xczxzxzxcxcxc<IMG src="http://file.ynet.com/2/1612/12/12119048.jpg" mce_src="http://file.ynet.com/2/1612/12/12119048.jpg">dfsd<IMG src="http://file.ynet.com/2/1612/12/12119048.jpg" mce_src="http://file.ynet.com/2/1612/12/12119048.jpg">sdfs</P>';
   s=str.match(/<img\s*src=\"([^\"]*?)\"[^>]*>/gi);
   s2=str.split(/\<img\s*src=\"([^\"]*?)\"[^>]*>/gi);
   //document.write(s);  
 
     for(var i= 0;i<s.length;i++)
   {
     document.write(s[i]);    
     document.write('<br/>')
     document.write(RegExp.$1);    
   }
 
   for(var i= 0;i<s2.length;i++)
   {
     document.write(s2[i]);
     document.write('<br/>')
    
   } 
 
}
catch(e)
{
    alert(e);
}

相关文章:

  • 2021-08-22
  • 2021-12-16
  • 2022-01-07
  • 2021-11-27
  • 2022-12-23
  • 2022-12-23
  • 2022-01-16
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-08-13
  • 2021-08-01
  • 2022-02-03
  • 2022-12-23
  • 2021-10-13
相关资源
相似解决方案