【发布时间】:2014-01-07 20:00:20
【问题描述】:
我有一个包含 2 个 iframe 的索引页面。当我单击 iframe 2 中的链接时,将在 iframe 1 中打开一个页面。现在,当您单击 iframe2 中的该链接时,我想更改浏览器选项卡标题。
我知道如何使用以下脚本更改浏览器标题选项卡,但这仅在索引页面上有效。
<script type="text/javascript">
$(document).ready(function(){
$('#link1').click(function(){
$('head title').text('HelloWorld');
});
});
</script>
<a id="link1" href="home.html" target="iframe1">Home</a>
希望你们能帮忙。
【问题讨论】: