Javascript 如何使用location.replace自动加载多个页面?
我想做一个网页,自动加载网页,给动画的错觉。我有7个图像(名为hands0、hands1等等,直到hands6),我希望它们按升序出现,然后按降序出现,然后重复 这是我目前掌握的代码。我的老师说使用location.replace,但我被卡住了。我还应该注意到,我删除了URL的中间部分,因为它们包含标识信息,所以它们看起来不像普通URLJavascript 如何使用location.replace自动加载多个页面?,javascript,replace,location,Javascript,Replace,Location,我想做一个网页,自动加载网页,给动画的错觉。我有7个图像(名为hands0、hands1等等,直到hands6),我希望它们按升序出现,然后按降序出现,然后重复 这是我目前掌握的代码。我的老师说使用location.replace,但我被卡住了。我还应该注意到,我删除了URL的中间部分,因为它们包含标识信息,所以它们看起来不像普通URL <!DOCTYPE html> <html> <body> <script> location.replace
<!DOCTYPE html>
<html>
<body>
<script>
location.replace("http://hands0.html");
location.replace("http://hands1.html");
location.replace("http://hands2.html");
location.replace("http://hands3.html");
location.replace("http://hands4.html");
location.replace("http://hands5.html");
location.replace("http://hands6.html");
location.replace("http://hands5.html");
location.replace("http://hands4.html");
location.replace("http://hands3.html");
location.replace("http://hands2.html");
location.replace("http://hands1.html");
</script>
</body>
</html>
位置。替换(“http://hands0.html");
位置。替换(“http://hands1.html");
位置。替换(“http://hands2.html");
位置。替换(“http://hands3.html");
位置。替换(“http://hands4.html");
位置。替换(“http://hands5.html");
位置。替换(“http://hands6.html");
位置。替换(“http://hands5.html");
位置。替换(“http://hands4.html");
位置。替换(“http://hands3.html");
位置。替换(“http://hands2.html");
位置。替换(“http://hands1.html");