|
服务器端发送的msg=“中文”
客户端
<meta http-equiv="Content-Type" content="text ml; charset=GBK" />
<script type="text/javascript">
$(function(){
$("#username").blur(function(){
var username = $("#username").val();
$.ajax({
type : "POST",
url : "<?php echo site_url('welcome eck');?>",
data : {username:username},
success : function(msg){
$("#usernameMsg").append(msg);
}
});
});
});
</script>
<span id="usernameMsg"></span>
最后显示出来的是乱码 |
|