samedi 4 avril 2015

How to force IFRAME write to Chrome history?

There is an IFRAME on the page. I want the location to be changed on button click and then Chrome writes a note about visiting of new location in the history. But the last thing doesn't happen.

http://ift.tt/1J5mlkR



<html>
<head>
<title>Testing IFRAME</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script src="lib/jquery.min.js"></script>
<script>
$(document).ready(function () {
$("button").click(function () {
$("iframe").attr("src", "http://www.gnu.org");
});
});
</script>
</head>
<body>
<button>Go</button>
<iframe src="http://www.ubuntu.com" width="1000" height="600"></iframe>
</body>
</html>




Aucun commentaire:

Enregistrer un commentaire