我有这个html结构:
<html>
<body>
This is the container of the iframe
<iframe src="/foo.html">
</iframe>
</body>
</html>
(/foo.html)
<html>
<script type="text/javascript">
$('a').click( function() {
window.location = window.location;
});
</script>
<body>
<a href="#">link to me</a>
</body>
</html>
当我多次单击“链接到我”时,iframe 嵌套在另一个 iframe 结构(如副本)中(使用 firebug,您可以验证这一点):
<html>
<body>
This is the container of the iframe
<iframe src="/foo.html">
<html>
<body>
This is the container of the iframe
<iframe src="/foo.html">
<html>
<body>
This is the container of the iframe
<iframe src="/foo.html">
</iframe>
</body>
</html>
</iframe>
</body>
</html>
</iframe>
</body>
</html>
¿ 我能做些什么来解决这个问题?