ajax: jquery get request

<script>

//異步請求@人功能

function at(){

$.get('some.url.com/controller/action', function(resp){

      if(resp!=null){//alert(resp);

  tt_tips = new TextAreaAutoTips('post_text', {

debug: false,

data:resp

});

  }

   });

}

window.onload =  at;

</script>


後端那邊最後就是echo $data ;

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章