阅读背景:

我想在按钮点击或使用post方法提交表单时使用javascript创建动态iframe

来源:互联网 
<html>
   <body> 
   <script language="Javascript">
   function actionCalled() {
   var iframe = document.createElement("iframe");
   var html = '<body> Hell Iframe </body>';
   iframe.src = "https://example.com";
   iframe.setAttribute("height", "200px");
   iframe.setAttribute("width", "400px");
   document.body.appendChild(iframe);
  }
</script>
</body>

<button onClick="actionCalled()"> Hello Iframe !</button>
</html>
<html>
   <body> 
   <script language="Javascri



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: