「マスキング付き」をchild.exampleに転送するようにプロバイダーによって設定されたドメインparent.exampleがあります。これは、URL「parent.example」がアドレス バーに残り、child.example のコンテンツがフレームセットを使用して表示されることを意味します。
カスタムファビコンを追加したいと思います。
これまでのところ、child.exampleページで試しました:
<script type="text/javascript">
var link = document.createElement("link");
link.type = "image/x-icon";
link.rel = "shortcut icon";
link.href = "http://www.child.example/img/favicon.ico";
parent.getElementsByTagName("head")[0].appendChild(link);
</script>
しかし、これは機能していません。
parent.example の HTML は次のとおりです。
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head><title>My Title</title></head>
<frameset rows="100%,*" border="0">
<frame src="http://child.example" frameborder="0" />
<frame frameborder="0" noresize />
</frameset>
<!-- pageok -->
<!-- 07 -->
<!-- -->
</html>
何か案は?