非常に単純な AJAX を作成しようとしているだけですが、何もありません。ありがとう!
<script>
function update()
{
if (window.XMLHttpRequest)
{// code for IE7+, Firefox, Chrome, Opera, Safari
xmlhttp=new XMLHttpRequest();
}
else
{// code for IE6, IE5
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}
var str='test';
xmlhttp.open("GET","localhost/userupdate.php?q="+str,true);
xmlhttp.send();
}
</script>
php ページ localhost/userupdate.php (WAMP)
<?php
$q=$_GET["q"];
echo $q;
?>