页面加载10秒后如何在PHP中调用函数(不使用HTML) [英] how to call a function in PHP after 10 seconds of the page load (Not using HTML)
本文介绍了页面加载10秒后如何在PHP中调用函数(不使用HTML)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在PHP中加载页面后10秒钟有什么方法可以调用函数. (不使用HTML.)
Is there any way to call a function 10 seconds after the page load in PHP. (Not using HTML.)
推荐答案
此代码有效.根据randell的答案进行编辑.
This code works. Edited from randell's answer.
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript">
$(document).ready(function()
{
setTimeout(function() { $('#some_id').load('index.php'); }, 10000);
});
</script>
感谢兰德尔
这篇关于页面加载10秒后如何在PHP中调用函数(不使用HTML)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文