基本上我有一个动态HTML表格对于特定的URL每5秒刷新一次表格
<table id="example"></table>
。
表中的内容根据URL更改。我默认 URL将
index.php?action=add
为此,我写了一个函数来刷新我的表,每隔5秒钟,工作正常
var autoLoad = setInterval(
function()
{
$('#example').load('index.php?action=add #example').fadeIn("slow");
}, 5000);
然后i'l我的网址更改为
index.php?action=add&subdo=loc
。
这将改变我的HTML表格内的内容。
让我怎么刷新我的HTML表格每5秒的新内容为index.php?action=add&subdo=loc
编辑:我将不得不改变对多个URL对我的表中对不同URL的不同内容。没有一个
index.php?action=add&subdo=loc1
index.php?action=add&subdo=loc2
当你说你是什么意思_ “然后i'l改变我的网址为” _?你在什么时候改变它的目的是什么? – 2015-02-11 11:40:56
您可以使用setInterval或在浏览器中每5秒钟按F5键。 – 2015-02-11 11:52:49