jquery 局部刷新

  作者:会飞的

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.0/jquery.min.js"></script><script language="javascript" type="text/javascript"><!--var Vink;$(d

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.0/jquery.min.js"></script>

<script language="javascript" type="text/javascript">

<!--

var Vink;

$(document).ready(function(){$.ajaxSetup ({cache:false}); });

function _G(id)

{

 var Vink;

 if (document.getElementById("_"+id))

 {

  document.getElementById("_"+id).innerHTML=$.ajax({url: "some.php",async: false}).responseText;

  Vink = setTimeout("_G('"+id+"')",1000);

 }

}

//-->

</script>

<p id="_1">sssss</p>

<script type="text/javascript">

_G('1');

</script>

<p>hello</p>

<p>world</p>


有用  |  无用

猜你喜欢