Comment puis-je changer la taille de l'iframe à partir de l'intérieur?

Je suis en développement avec jquery et je suis tombé avec le problème suivant: j'ai ajouté un IFrame à l'intérieur de la page principale et je veux re de la taille de l'intérieur. J'ai essayé quelques idées, mais sans succès.

Voici mon code:

index.html

<html>
    <head>
        <title>Index</title>
    </head>
    <body>
        <iframe id="myframe" src="frame.html" width="100px" height="100px"></frame>
    </body>
</html>

frame.html

<html>
    <head>
        <title>IFrame</title>
        <script>
            document.width = 500;
            document.height = 500;
        </script>
    </head>
    <body>
        <h2>My IFrame</h2>
    </body>
</html>
InformationsquelleAutor Jillian | 2013-08-27