开发者

<title> and window.parent

开发者_高级运维my site is a design on index.php and then a frame on it.. Now, i want to do so the titles changes When you browse to eg. Videos.php.

So how should i do this with window.parent and title?

The title needs to be changed on index.php.

So cant it be done like on videos.php:

<script>
        window.parent.changeTitle("Videos - Mysite.com"); 
</script>

and then on index.php:

function changeTitle(msg) {
    <title>(msg)</title>
}

just an thought i dont know really..


Try the following code:

window.parent.document.title = "Videos - Mysite.com";

Your code won't work - the function you wrote isn't even syntactically valid. Plus, adding a title tag after the page has loaded would have no effect - you need to change the document title by updating the document.title attribute.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜