网页运行代码
摘要:
看网站的源码发现了运行代码原来是这么实现的。。受教了。。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,就可以 阅读全文
posted @ 2011-10-17 21:53 G.N&K 阅读(375) 评论(0) 推荐(0) 编辑