日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問(wèn) 生活随笔!

生活随笔

當(dāng)前位置: 首頁(yè) > 编程资源 > 编程问答 >内容正文

编程问答

html5js实现正计时,在Html5中js怎么设置正计时开始

發(fā)布時(shí)間:2024/1/1 编程问答 36 豆豆
生活随笔 收集整理的這篇文章主要介紹了 html5js实现正计时,在Html5中js怎么设置正计时开始 小編覺(jué)得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.

這個(gè)是Html5的一個(gè)程序。我從網(wǎng)上拷貝下來(lái)的。現(xiàn)在打開(kāi)后就是別人的計(jì)時(shí),請(qǐng)問(wèn)怎么變成讓別人點(diǎn)擊后計(jì)時(shí)再重新開(kāi)始。然后就一直計(jì)時(shí)下去,其他人打開(kāi)時(shí)依然是第一次點(diǎn)擊時(shí)的計(jì)時(shí)。

這個(gè)是代碼:

Our Love Story

@font-face {

font-family: digit;

src: url('digital-7_mono.ttf') format("truetype");

}

/**

* We are both Fudan SSers and programmers,

* so I write some code to celebrate our 1st anniversary.

*/

Boy i = new Boy("hackerzhou");

Girl u = new Girl("MaryNee");

// Nov 2, 2010, I told you I love you.

i.love(u);

// Luckily, you accepted and became my girlfriend eversince.

u.accepted();

// Since then, I miss u every day.

i.miss(u);

// And take care of u and our love.

i.takeCareOf(u);

// You say that you won't be so easy to marry me.

// So I keep waiting and I have confidence that you will.

boolean isHesitate = true;

while (isHesitate) {

i.waitFor(u);

// I think it is an important decision

// and you should think it over.

isHesitate = u.thinkOver();

}

// After a romantic wedding, we will live happily ever after.

i.marry(u);

i.liveHappilyWith(u);

Minyue, I have fallen in love with you for

Love u forever and ever.

- hackerzhou

Inspired by FlowerPower project.

Copyright ? 2011 hackerzhou.me 2009-2011

var offsetX = $("#loveHeart").width() / 2;

var offsetY = $("#loveHeart").height() / 2 - 55;

var together = new Date();

together.setFullYear(2010, 10, 2);

together.setHours(20);

together.setMinutes(0);

together.setSeconds(0);

together.setMilliseconds(0);

if (!document.createElement('canvas').getContext) {

var msg = document.createElement("div");

msg.id = "errorMsg";

msg.innerHTML = "Your browser doesn't support HTML5!
Recommend use Chrome 14+/IE 9+/Firefox 7+/Safari 4+";

document.body.appendChild(msg);

$("#code").css("display", "none")

$("#copyright").css("position", "absolute");

$("#copyright").css("bottom", "10px");

document.execCommand("stop");

} else {

setTimeout(function () {

startHeartAnimation();

}, 5000);

timeElapse(together);

setInterval(function () {

timeElapse(together);

}, 500);

adjustCodePosition();

$("#code").typewriter();

}

分享至:

總結(jié)

以上是生活随笔為你收集整理的html5js实现正计时,在Html5中js怎么设置正计时开始的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。

如果覺(jué)得生活随笔網(wǎng)站內(nèi)容還不錯(cuò),歡迎將生活随笔推薦給好友。