<script type="text/javascript">
var newContent= content.replace(/<img [^>]*src=['"]([^'"]+)[^>]*>/gi,function(match,capture){

  //capture,返回每个匹配的字符串
  var newStr='<img src="http://www.csghj.gov.cn'+capture+'" alt="" />';
  return newStr;
});
console.debug(newContent);
</script>

转自:http://blog.csdn.net/burongwawa520/article/details/46562015

 

相关文章:

  • 2021-12-09
  • 2022-12-23
  • 2021-07-15
  • 2022-12-23
  • 2021-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-07-13
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案