私はいくつかのWordPressページ内にiFrameを埋め込もうとしています。各ページは異なるiFrameコンテンツを使用します。これは商用サイトのため、最初のiframeを顧客のログインにする必要があります。後続の別のWPページ上のiframeの製品検索のためになり、チェックアウト...((私の質問は、一番下にある))header.phpの中WordPressで閉じる/ bodyタグの後にJavascriptを追加するには
は、私は私が上で含める必要があるいくつかの初期のコードを配置しましたすべてのWordPressページ。
各ページの本文内にiframeを追加しました。
iframeを特定のiframeコンテンツに初期化する必要があります。私は次のように閉じ
</body>
タグの後にこのコードを配置したいと思います:
<html>
<head>
<script>
var absDomain = "http://www.webstore.com/"
var iframeObj;
var timestampString = '' + new Date().getTime() + ''
document.write('<script type="text/javascript" src="' + absDomain + 'Support.js?'+timestampString+'"><\/script>');
document.write('<script type="text/javascript" src="' + absDomain + 'ProductSearch.js?'+timestampString+'"><\/script>');
document.write('<script type="text/javascript" src="' + absDomain + 'Environment.js?'+timestampString+'"><\/script>');
function gotoIframe(theLocation){
var timeStamp = "";
iframeObj = document.getElementById("iframeContent");
timeStamp = "&" + new Date().getTime();
iframeObj.src = absDomain + theLocation + "?iframe=yes" + timeStamp;
}
function executeIFrameProductSearch(str1, str2){
goTo_CategoryForIframe(str1, str2, document.getElementById("iframeContent"));
}
</script>
</head>
<body>
<!-- iFrame embedded below -->
<iframe id="iframeContent" style="width:100%;height:500px; " src=""></iframe>
</body>
<script>
//script needed for initial iframe page and iframe support.
iframeObj = document.getElementById("iframeContent");
gotoIframe("CustomerLogin.html");
</script>
</html>
//After the above code section (after the </body> tag) is embedded into the Login page, I expect to use:
//Customer Login:
<a href="javascript:gotoIframe('CustomerLogin.html')">Customer Login</a>
//Product Search:
<a href="javascript:gotoIframe('ProductSearch.html')">Product Search</a>
質問:私は特定のWordPressのページのそれぞれの終了タグの後のコードを挿入します?ありがとう。
を表示したい場所を、私は奇妙で不思議な要件は