Html 选项卡中的IFrame未加载

Html 选项卡中的IFrame未加载,html,iframe,jotform,Html,Iframe,Jotform,我不是一个HTML编码员,被要求在一个问题上提供帮助。 我以为需要5秒钟,但我有一个错误。 它只是一个html页面,有两个选项卡,每个选项卡都嵌入了Jotform iFrame。 当切换到第二个选项卡(非默认)时,它不会加载。 我在选项卡之间交换了默认标记,它也会这样做。 调试器仅显示以下冲突,但不是错误: [违规]将同步DOM变异侦听器添加到“DomainNodeInserted”事件。考虑使用突变观察者使页面更加敏感。 代码片段 <html> <body> <

我不是一个HTML编码员,被要求在一个问题上提供帮助。 我以为需要5秒钟,但我有一个错误。 它只是一个html页面,有两个选项卡,每个选项卡都嵌入了Jotform iFrame。 当切换到第二个选项卡(非默认)时,它不会加载。 我在选项卡之间交换了默认标记,它也会这样做。 调试器仅显示以下冲突,但不是错误:

[违规]将同步DOM变异侦听器添加到“DomainNodeInserted”事件。考虑使用突变观察者使页面更加敏感。

代码片段

<html>
<body>

<div class="tab">
  <button class="tablinks active" onclick="openTab(event, 'ITSupport')" ><B>IT Support</B></button>
  <button class="tablinks" onclick="openTab(event, 'ProjectRequest')" ><B>Project Request</b></button>

</div>

<div id="ITSupport" class="tabcontent">
 <iframe
      id="JotFormIFrame-yyyyyyyyy"
      title="Service Desk"
      onload="window.parent.scrollTo(0,0)"
      allowtransparency="true"
      allowfullscreen="true"
      allow="geolocation; microphone; camera"
      src="https://form.myjotform.com/yyyyyy"
      frameborder="0"
      style="
      min-width: 100%;
      height: 100%;
      border:none;"
      scrolling="no"
    >
    </iframe>

</div>

<div id="ProjectRequest" class="tabcontent">
     <iframe
      id="JotFormIFrame-xxxx"
      title="Project Request Form"
      onload="window.parent.scrollTo(0,0)"
      allowtransparency="true"
      allowfullscreen="true"
      allow="geolocation; microphone; camera"
      src="https://form.jotform.com/xxxxxxx"
      frameborder="0"
      style="
      min-width: 100%;
      height: 100%;
      border:none;"
      scrolling="no"
    >
    </iframe>


</div>


<script>
function openTab(evt, tabName) {
  var i, tabcontent, tablinks;
  tabcontent = document.getElementsByClassName("tabcontent");
  for (i = 0; i < tabcontent.length; i++) {
    tabcontent[i].style.display = "none";
  }
  tablinks = document.getElementsByClassName("tablinks");
  for (i = 0; i < tablinks.length; i++) {
    tablinks[i].className = tablinks[i].className.replace(" active", "");
  }
  var allIds = document.querySelectorAll('#' + tabName);
  allIds[allIds.length - 1].style.display = "block";
  evt.currentTarget.className += " active";
}

document.querySelector('.tablinks.active').click();
</script>

</body>
</html>

IT支持
项目请求
函数openTab(evt,tabName){
var i,tabcontent,tablinks;
tabcontent=document.getElementsByClassName(“tabcontent”);
对于(i=0;i