87,910
社区成员
发帖
与我相关
我的任务
分享
var s = '<div><a href="/list/001">目录页1</a>,这是<a href="http://www.otherdomain.com/news/2.html">新闻2</a>,接下来请浏览<A href="/pro/123.html" target="_blank">商品页3</A>'
s = s.replace(/href=\"(?!https?\/\/)\//gi, "href=\"http://www.domain.com/")
alert(s)