Ajax problems. Paste online. I have a quick search function. But pass the test. Found & nbsp; Chinese characters that I entered into the text box. It is garbled. I used a function to convert & nbsp. But I forgot the function. I posted the approximate code. Help me ;. Urgent & lt; select & nbsp; name = "suppler_id" & nbsp; st ajax problem. Paste online.
I have a quick search function. But pass the test. The Chinese characters that I entered into the text box are found. It is garbled. I used a function to convert it. But I forgot the function. I posted the approximate code. Please help me. Urgent
Select supplier
"
>
Quick search for customers:
Select customer
"
>
$(document).ready(function () {
$(function(){
$("#username").live('keyup',function(){
var username = $(this).val();
if(username != ''){
$.post('../userajax.php',{'username':username},function(msg){
$("#userdiv").html(msg)
});
}
})
})
});
《script》
------ Solution --------------------
First, check the character set encoding of your page to ensure that the html page is consistent with the php encoding, which should be caused by inconsistent encoding.
------ Solution --------------------
String iconv (string $ in_charset, string $ out_charset, string $ str)