首页 > 代码库 > ajax分页

ajax分页

<script  src="http://www.mamicode.com/ajax.js"></script>

<div id=‘fpage‘>

   数据加载中

</div><script>

 function setPage(url){

   var obj = document.getlemetByid(‘Fpage‘);

  var ajax = ajax();

  ajax.get(url,function(data){

     obj.innerHtml=data;

  })

}

setPage("demo.php?page=1");

</script>

<hr>

<script>

  document.write(new Date()+"<br>");

</script>

ajax分页