<script type="text/javascript" src="js/jquery-1.4.3.min.js"></script>
<script> var paypal_ajax= setInterval("paypal_ajax_return()",10000); //5秒执行一次YourFunction函数。 function paypal_ajax_return(){ var url = "paypal_ajax.PHP?action=getstatus"; $.get(url,function(status){ if(status=='success') { clearInterval(paypal_ajax);//停止循环调用 //window.open(url); alert("状态:" + status); } }); //alert (url); } </script>
原文链接:https://www.f2er.com/ajax/161502.html