很少見的時(shí)間插件(非日期插件)

字號(hào):


    代碼如下:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <title>網(wǎng)頁特效-時(shí)間特效-很少見的時(shí)間插件(非日期插件)</title>
    <meta http-equiv="content-type" content="text/html;charset=gb2312">
    <!--把下面代碼加到<head>與</head>之間-->
    <script type="text/javascript" src="http://www.zzsky.cn/effect/images/20128/100830/jquery-1.7.2.js"></script>
    <script type="text/javascript" src="http://www.zzsky.cn/effect/images/20128/100830/jquery.settime.js"></script>
    </head>
    <body>
    預(yù)覽效果時(shí)左下角會(huì)提示錯(cuò)誤,而且看不到效果,刷新一下就可以看到效果了;當(dāng)然,在實(shí)際使用中,不會(huì)出現(xiàn)這樣的問題。<br>
    <!--把下面代碼加到<body>與</body>之間-->
    <p id="msg">msg</p>
    <p>time1<input id="time" value=""></p>
    <p>time2<input id="time2" value=""></p>
    <p>time3<input id="time3" value=""></p>
    <p><input type="button" id="button" value="button"></p>
    <script type="text/javascript">
    $('#time').setTime();
    $('#time2').setTime({
    drag:true,
    h:[5,20],
    i:[5,50],
    s:[5,45],
    a:0.05,
    constraint:'',
    'starteffect': function(d){
    $('#msg').html(d[0]);
    },
    'onmove':function(e){
    $('#msg').html(e[0] + '/' + e[1])
    },
    zindex:'0',
    'cursor':'move',
    'area':[[50,600],[10 ,5000]],
    'callback':function(){
    //alert(1)
    }
    });
    $('#time3').setTime({
    drag:true,
    a:0.05
    });
    $('#button').click(function(){
    alert( $('#time').val() );
    alert( $('#time2').val() );
    alert( $('#time3').val() );
    });
    </script>
    </body>
    </html>