I have three simple HTML files in one directory:
index.html
<html>
<head>
<title>Page 1</title>
</head>
<body>
<iframe src="page2.html"></iframe>
</body>
</html>
page2.html and page3.html (about the same content)
<html>
<head>
<title>Page 2</title>
</head>
<body>
This is the content of page 2
</body>
</html>
<html>
<head>
<title>Page 3</title>
</head>
<body>
This is the content of page 3
</body>
</html>
index.html contains <iframe>that points to one of the other two HTML files.
When I load index.htmlfor the first time, it works as expected and prints “This is the contents of page 2”. But when I change the attribute srcto "page3.html" and reload the page, nothing changes. He continues to tell me “This is the contents of page 2,” although he should download page 3.
, (index.html), " 3". page2.html, 3.
. , - .
:
<script>
document.write(document.querySelector("iframe").src);
</script>
. ( iframe .)
, , , iframe, .
? ?
.
P.S. Firefox 29.
P.S. (2) , .