问题
I just have them in the body of the page one after the other. If I do this with <object>, I see them all. With iFrames, I only see the first one.
<iframe id="AlertMaintenance" style="border-style: none; border-color: inherit; border-width: 0px; height:1222px; width:100%;" src="AlertMaintenance.html"/>
<iframe id="DelayReason" style="border-style: none; border-color: inherit; border-width: 0px; height:1222px; width:100%;" src="DelayReason.html"/>
回答1:
You have to specify a </iframe> closing tag. Self-closing tags ( />) don't work.
Working code:
<iframe id="AlertMaintenance" style="border-style: none; border-color: inherit; border-width: 0px; height:1222px; width:100%;" src="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 are required. See also: MDN: iFrame.
回答2:
Iframe has a closing tag:
<iframe ...></iframe>
Add em' in.
回答3:
You're trying to use selfclosing tags.
Change this to:
<iframe id="AlertMaintenance" style="border-style: none; border-color: inherit; border-width: 0px; height:1222px; width:100%;" src="AlertMaintenance.html"></iframe>
<iframe id="DelayReason" style="border-style: none; border-color: inherit; border-width: 0px; height:1222px; width:100%;" src="DelayReason.html"></iframe>
来源:https://stackoverflow.com/questions/8068578/how-do-i-use-multiple-iframes-in-my-html-page