网页运行代码
看网站的源码发现了运行代码原来是这么实现的。。受教了。。
function run_Code(code) { var pop = window.open('', "_blank", ''); pop.document.open('text/html', 'replace'); pop.opener = null // 防止代码对论谈页面修改 pop.document.write(code); pop.document.close(); }
上面注释的地方应该‘深思’下,如果在页面运行代码处,获得opener,就可以入侵。。