等待跳转JS倒计时10秒

废话就不多说了,开始。。。

    1、

    <

    html

    >

    <

    head

    >

    <

    meta

    http-equiv

    ="Content-Type"

    content

    ="text/html; charset=gb2312"

    >

    <

    title

    >

    counter

    </

    title

    >

    <

    script

    language

    ="javascript"

    type

    ="text/JavaScript"

    >

    function

    Counter(nMax, nInterval) {

    this

    .maxTime = nMax;

    this

    .interval = nInterval;

    this

    .objId =

    "timer"

    ;

    this

    .obj =

    null

    ;

    this

    .num =

    this

    .maxTime;

    this

    .timer =

    null

    ;

    this

    .start =

    function

    () {

    this

    .obj = document.getElementById(

    this

    .objId);

    if

    (

    this

    .num > 0) setTimeout(

    this

    .run,

    this

    .interval * 1000); };

    this

    .run =

    function

    () {

    if

    (myCounter.num > 0) { myCounter.num--; myCounter.obj.innerHTML = myCounter.num; myCounter.timer = setTimeout(myCounter.run, myCounter.interval * 1000); }

    else

    clearTimeout(myCounter.timer); };

    this

    .show =

    function

    () { document.write(

    "<span id="

    +

    this

    .objId+

    ">"

    +

    this

    .num +

    "</span>"

    );

    this

    .obj = document.getElementById(

    this

    .objId);

    //alert(this.obj.innerHTML);

    } }

    </

    script

    >

    </head><body οnlοad=

    "myCounter.start();"

    > <script language=

    "JavaScript"

    type=

    "text/JavaScript"

    >

    var

    myCounter =

    new

    Counter(10, 1);

    </

    script

    >

    <p> 当初剩下 <script language=

    "JavaScript"

    type=

    "text/JavaScript"

    > myCounter.show();

    </

    script

    >

    秒钟!

    </

    p

    >

    </

    body

    >

    </

    html

    >

 

    2、

 

    请等待

    <

    span

    id

    ="dd"

    >

    10

    </

    span

    >

    秒

    <

    script

    type

    ="text/javascript"

    >

    function

    run() {

    var

    s = document.getElementById(

    "dd"

    );

    if

    (s.innerHTML == 0) { window.location.href =

    'regform.shtml'

    ;

    return

    false

    ; } s.innerHTML = s.innerHTML * 1 - 1; } window.setInterval(

    "run();"

    , 1000);

    </

    script

    >

    

    每日一道理
成熟是一种明亮而不刺眼的光辉,一种圆润而不腻耳的音响,一种不需要对别人察颜观色的从容,一种终于停止了向周围申诉求告的大气,一种不理会哄闹的微笑,一种洗刷了偏激的淡漠,一种无须声张的厚实,一种并不陡峭的高度。

 

 

    3、

 

    <!

    DOCTYPE

    html

    PUBLIC

    "-//W3C//DTD XHTML 1.0 Transitional//EN"

    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"

    >

    <

    script

    type

    ="text/javascript"

    >

    <!--

    var

    duration = 9900;

    var

    endTime =

    new

    Date().getTime() + duration + 100;

    function

    interval() {

    var

    n = (endTime -

    new

    Date().getTime()) / 1000;

    if

    (n < 0)

    return

    ; document.getElementById(

    "timeout"

    ).innerHTML = n.toFixed(3); setTimeout(interval, 10); } window.onload =

    function

    () { setTimeout(

    "window.location.href='http://www.17mm.net'"

    , duration); interval(); }

    //-->

    </

    script

    >

    <

    html

    xmlns

    ="http://www.w3.org/1999/xhtml"

    >

    <

    head

    runat

    ="server"

    >

    <

    title

    >

    等待10秒

    </

    title

    >

    </

    head

    >

    <

    body

    >

    <

    form

    id

    ="form1"

    runat

    ="server"

    >

    <

    div

    >

    当初剩下

    <

    span

    id

    ="timeout"

    >

    10.000

    </

    span

    >

    秒后 将动自跳转

    </

    div

    >

    </

    form

    >

    </

    body

    >

    </

    html

    >

    

    

文章结束给大家分享下程序员的一些笑话语录: 关于编程语言
如果 C++是一把锤子的话,那么编程就会变成大手指头。
如果你找了一百万只猴子来敲打一百万个键盘,那么会有一只猴子会敲出一 段 Java 程序,而其余的只会敲出 Perl 程序。
一阵急促的敲门声,“谁啊!”,过了 5 分钟,门外传来“Java”。
如果说 Java 很不错是因为它可以运行在所有的操作系统上,那么就可以说 肛交很不错,因为其可以使用于所有的性别上。


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值