Heim > Artikel > Backend-Entwicklung > 各大神帮帮忙,怎么解决这个乱码问题
这是前面部分
header("Content-Type:text/html;charset=utf-8");
?>
<script></script>
<script> <br /> function show(username){ <br /> if(username==""){ <br /> alert("用户名不能为空"); <br /> return; <br /> } <br /> var ajax=Ajax(); <br /> var userobj=document.getElementById("userid"); <br /> ajax.post("form.php",{username:username},function(data){ <br /> userobj.innerHTML=data; <br /> }); <br /> } <br /> </script>