に、私は元のためのワードプレスのサイトパスの問題、wordpressのサイト
を持って、www.test.com
mythemeフォルダのスクリプトフォルダ内のjsファイル(forms.js)があります。
すなわち(テーマ/ mytheme /スクリプト/ forms.js)
mail.phpページがmythemeフォルダ内にあり
すなわち(テーマ/ mytheme/mail.php)
には、以下のforms.jsの内容である
function submitFormToEmail()
{
var xmlhttp;
if (window.XMLHttpRequest)
{// code for IE7+, Firefox, Chrome, Opera, Safari
xmlhttp=new XMLHttpRequest();
}
else
{// code for IE6, IE5
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}
xmlhttp.onreadystatechange=function()
{
if (xmlhttp.readyState==4 && xmlhttp.status==200)
{
//document.getElementById("results").innerHTML=xmlhttp.responseText;
alert("Form received, thank you!");
}
}
xmlhttp.open("GET","/mail.php",true);
xmlhttp.send();
}
我々はページ
で画像をクリックすると3210
は、私は、 "submitFormToEmail" と呼びます* www.test.com/hello_test * "hello_test" ページがテーマ/ mytheme /にある
。
しかし、mail.phpは機能しません。それはhttp://www.test.com/mail.php
でmail.phpファイルを探します/mail.php
を呼び出す
あなたのインデントスタイルは本当に恐ろしいです。 – ThiefMaster
私の質問は明確ではありませんか? – Linto