ページから ajax を介してテキストをブラインディングし、そのテキストを div に表示する jquery があります。そのデータを php 変数に渡したいのですが、どうすればよいですか?
私のjqueryコードは
<script type="text/javascript">
var xmlHttp = null;
window.onload = function() {
xmlHttp = new XMLHttpRequest();
xmlHttp.open("GET", "abc.php", true);
xmlHttp.onreadystatechange = onCallback;
xmlHttp.setRequestHeader('Content-type','application/x-www-form-urlencoded');
xmlHttp.send(null);
}
function onCallback() {
if (xmlHttp.readyState == 4) {
if (xmlHttp.status == 200) {
alert(xmlHttp.responseText);
document.getElementById('show').innerHTML=xmlHttp.responseText;
}
}
}
</script>
ここで、同じファイルの php 変数に xmlhttp.responseTexrt を保存したいのですが、どうすればよいですか?