Skip to content

Instantly share code, notes, and snippets.

@qingfeng
Created July 30, 2008 09:17
Show Gist options
  • Save qingfeng/3249 to your computer and use it in GitHub Desktop.
Save qingfeng/3249 to your computer and use it in GitHub Desktop.
1.domid的部分可以写一个div的id
2.setInterval中的时间单位是毫秒
<html>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js"></script>
<div id="#domid"></div>
<script>
function getlog(){
$.ajax({
type:'GET',
url:'/url/',
dataType:'html',
success: function(msg){
$("#domid").html(msg)
}
})
}
setInterval('getlog()',1000)
</script>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment