javascript
var a="sadahdka sarr  "
jQuery.ajax(
{
type:"POST",
url:"function/postbai.php",
data:"a="+a,
success:function(html)
{
alert(html);
}
});
Before
var a="sadahdka sarr  "
After why
$_POST['a']="sadahdka sarr"
Help jquery ajax html special chars
See Question&Answers more detail:os