データベースからテキストを表示するスクリプトを使用していますが、これは Chrome では問題なく機能しますが、Explorer と Firefox では機能しません。問題はおそらく特殊文字 (UTF 8) にあります。つまり、名前選択ピーターは IE/FF で正常に機能し、ピーター情報を表示しますが、デジレはデジレ情報を表示しません (ただし、存在し、Chrome では表示されます)。これはおそらく特殊な é 文字が原因です。これにより、HTML ヘッダーとスクリプト コードと、うまくいけば誰かが私に正しい解決策を提供してくれますか?
<head>
<link rel='stylesheet' type='text/css' href='css/ola.css' />
<link rel='stylesheet' type='text/css' href='css/ola_table.css' />
<meta http-equiv="content-type" content="text/html; charset=utf-8"></meta>
</head>
--+--
<script>
function showUser(str, strKlas, strPer)
{
//alert("Binnen: " + str + " - Klas: " + strKlas + " - Periode: " + strPer);
if (str=="")
{
document.getElementById("txtHint").innerHTML="";
return;
}
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("txtHint").innerHTML=xmlhttp.responseText;
}
}
xmlhttp.open("GET","getuser.php?klas="+strKlas+"&periode="+strPer+"&q="+str,true);
//xmlhttp.open("GET","getuser.php?klas=4B1&periode=1&q="+str,true);
xmlhttp.send();
}
</script>