0
可能重複:
How to change window title from a frame in javascript?有沒有辦法通過使用JavaScript來改變框架中頁面的index.html標題?
在我的index.html文件我有3張。
我想更改index.html的標題從一個框架中的頁面。
這怎麼能通過使用JavaScript來完成?
可能重複:
How to change window title from a frame in javascript?有沒有辦法通過使用JavaScript來改變框架中頁面的index.html標題?
在我的index.html文件我有3張。
我想更改index.html的標題從一個框架中的頁面。
這怎麼能通過使用JavaScript來完成?
是的,但它必須是在同一個域(和使用相對URL的路徑)
window.parent.document.title = "Your new title";
如果IFRAME /框架是在不同的領域,那麼你會得到許可否認錯誤。
如果上述失敗,使用
使用top.document.title
(上指的是最上面的窗口在瀏覽器內)
你的意思''
@Jimmy X,否,框架集中的框架。 – HelpNeeder 2012-03-04 02:48:12
@Thilo,謝謝你的鏈接。 – HelpNeeder 2012-03-04 02:53:16