Exemplo Anterior-|-Próximo Exemplo-|-Retornar à Listagem dos Capítulos

Exemplo 15.3:
Referenciando os Frames

Dê um clique nos botões para alterar as cores:


Estes são os scripts que usamos. Primeiro, na seção HEAD: <SCRIPT LANGUAGE="JAVASCRIPT"> <!-- function reinicializar() { window.document.bgColor="white" top.frames[1].document.bgColor="white" top.frames[2].document.bgColor="white" top.frames[3].document.bgColor="white" } //--> </SCRIPT> Depois, estes botões: <FORM> <INPUT TYPE="button" VALUE="Alterar o primeiro frame para Laranja" onclick="parent.frames[0].document.bgColor='orange'"><P> <INPUT TYPE="button" VALUE="Alterar frame2 para Vermelho" onclick="parent.frames[1].document.bgColor='red'"><P> <INPUT TYPE="button" VALUE="Alterar frame3 para Verde" onclick="parent.frame3.document.bgColor='green'"><P> <INPUT TYPE="button" VALUE="Alterar frame4 para Azul" onclick="top.frames[3].document.bgColor='blue'"><P> <INPUT TYPE="button" VALUE="Reinicializar as Cores" onclick="reinicializar()"> </FORM>
Exemplo Anterior-|-Próximo Exemplo-|-Retornar à Listagem dos Capítulos