Get ajax response with extra space
I have write same jquery ajax function on two different pages. In one page I got
"Hi"
and another page
" Hi"
. why this extra space before Hi? see my code below
- jQuery.ajax({
- type:"POST",
- data:"pid="+pid,
- url:"mypage.php",
- success:function(html){
- });
In mypage.php page
- echo "Hi";
I don't understand what happened ? How to get rid of it ?