Wie verwende ich mehrere iFrames in meiner HTML-Seite?

Lesezeit: 1 Minute

Ich habe sie einfach nacheinander im Hauptteil der Seite. Wenn ich das mit mache <object>, ich sehe sie alle. Bei iFrames sehe ich nur den ersten.

<iframe id="AlertMaintenance" style="border-style: none; border-color: inherit; border-width: 0px; height:1222px; width:100%;" src="https://stackoverflow.com/questions/8068578/AlertMaintenance.html"/>

<iframe id="DelayReason" style="border-style: none; border-color: inherit; border-width: 0px; height:1222px; width:100%;" src="DelayReason.html"/>

Sie müssen a angeben </iframe> schließendes Tag. Selbstschließende Tags ( />) geht nicht.

Arbeitscode:

<iframe id="AlertMaintenance" style="border-style: none; border-color: inherit; border-width: 0px; height:1222px; width:100%;" src="https://stackoverflow.com/questions/8068578/AlertMaintenance.html"></iframe>
<iframe id="DelayReason" style="border-style: none; border-color: inherit; border-width: 0px; height:1222px; width:100%;" src="DelayReason.html"></iframe>

End-Tags sind erforderlich. Siehe auch: MDN: iFrame.

Iframe hat ein schließendes Tag:

<iframe ...></iframe>

Fügen Sie sie hinzu.

Sie versuchen, selbstschließende Tags zu verwenden.

Ändern Sie dies zu:

<iframe id="AlertMaintenance" style="border-style: none; border-color: inherit; border-width: 0px; height:1222px; width:100%;" src="https://stackoverflow.com/questions/8068578/AlertMaintenance.html"></iframe>

<iframe id="DelayReason" style="border-style: none; border-color: inherit; border-width: 0px; height:1222px; width:100%;" src="DelayReason.html"></iframe>

1433810cookie-checkWie verwende ich mehrere iFrames in meiner HTML-Seite?

This website is using cookies to improve the user-friendliness. You agree by using the website further.

Privacy policy