需要每2秒延迟更改我网页上的文本 [英] Need to change text on my web page with every 2 seconds delay

查看:126
本文介绍了需要每2秒延迟更改我网页上的文本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,我正在制作一个简单的网站,我想在其主页上进行介绍.在我的简介中,我想告诉读者我喜欢做的事情.因此,我尝试添加以下一行:

我喜欢摄影"

但是问题是我希望每两秒钟后,照相文字更改为另一文本.作为示例,请参见以下参考网站:

http://soulwire.co.uk/hello

有人可以为此提供步骤/代码吗?我不需要像上面的网站那样对更改的文本进行动画处理,但我只希望每2秒钟的延迟就更改文本


提前谢谢!
Zuhaib

Hi, I am making a simple website and I want to give my introduction on its home page. In my introduction I want to tell readers about the things that I like to do. Hence I am trying to add one following row:

"I like PHOTOGRAPHY"

But the issue is that I want the text PHOTOGRAPHY to change with another text after every two seconds. As an example please see this reference website:

http://soulwire.co.uk/hello

Can anyone please provide me steps/code for this? I don''t need the changing text to be animated like the above website but I just want my text to change with every 2 sec delay


Thanks in advance!
Zuhaib

推荐答案

在此处明确说明:
一种方式: http://www.howtocreate.co.uk/tutorials/javascript/timers [ ^ ],
另一种方式: http://mcfedries.com/javascript/timer.asp [
This is clearly explained here:
One way: http://www.howtocreate.co.uk/tutorials/javascript/timers[^],
Another way: http://mcfedries.com/javascript/timer.asp[^].

Just try it.

—SA


这篇关于需要每2秒延迟更改我网页上的文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆