2011-11-09 18 views
20

Acabo de tenerlos en el cuerpo de la página uno después del otro. Si hago esto con <object>, los veo a todos. Con iFrames, solo veo el primero.¿Cómo uso múltiples iFrames en mi página html?

<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"/> 

Respuesta

42

tiene que especificar una etiqueta de cierre </iframe>. Las etiquetas de cierre automático (/>) no funcionan.

código de trabajo: se requieren

<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> 

etiquetas de finalización. Vea también: MDN: iFrame.

2

Está tratando de usar etiquetas de autocierre.

Cambiar esto a:

<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> 
2

marco flotante tiene una etiqueta de cierre:.

<iframe ...></iframe> 

Añadir em' en

Cuestiones relacionadas