1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
var timeout = prompt("时间间隔(秒)");
var current = location.href;
if (timeout > 0) {
setTimeout('reload()', 1000 * timeout);
}
else {
location.replace(current);
}
function reload() {
setTimeout('reload()', 1000 * timeout);
var fr4me = '<frameset cols=\'*\'>\n<frame src=\'' + current + '\' />';
fr4me += '</frameset>';

with (document) {
write(fr4me);
void (close());
};
}