iframe笔记

324 阅读1分钟

iframe代码注入

iframe的src中可以通过如下方法注入代码

javascript:void(
  function(){
      document.open();
      document.write("
        <html>
          <head>
            <script src='/template/libs/jquery.min.js'><\/script>
            <link rel='stylesheet' href='/template/libs/run.css' \/>
          </head>
          <body></body>
        </html>
      ");
      document.close()
  }()
)