var imgs = html.match(/<img[^>]+>/g)
document.getElementById('test').innerHTML = imgs.join('')
var str = "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.1//EN\" \"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd\">"str = str.replace(/^[<!DOCTYPE html].*[>]$/,"<!DOCTYPE html>")
alert(str)
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)