html5颜值测试小游戏,html5毫秒统计测试手指点击速度手机游戏

特效描述:html5 手机游戏。html5双击页面 测试双击的时间间隔,测试你的手指灵活度。

代码结构

1. 引入JS

2. HTML代码

10.00 秒

点我点我

0 次

请点击右上角
点击【分享到朋友圈】
测测好友的反应能力吧!

var helptime=0;

function help(){

}

var mebtnopenurl = 'http://mp.weixin.qq.com/s?__biz=MjM5MDIzNzA3OQ==&mid=212363137&idx=1&sn=30a38c9e63cf9475bc55a6673b3ac397#rd';

var myscore=0;

window.shareData = {

"imgUrl": "http://mmbiz.qpic.cn/mmbiz/kG4NuD28mGictKFRXfZ0g7uqcLXTc8ObCL4X4wIDCiboe8U1LDNmd6RFs957EznDEbeHu04uTnIuBGzCRMgOOn0w/640",

"timeLineLink": "http://game.weixine.net/fksz/index.html",

"tTitle": "疯狂手指-根本停不下来,玩过之后我的手指已经不是我的了!",

"tContent": "在10秒内疯狂的点按钮,想赢?不容易。"

};

function goHome(){

window.location="http://game.weixine.net/fksz/index.html";

}

function dp_share(score){

if(score>0){

document.title = "10秒我能点"+score+"下!你行?你试试"

}

else{

document.title = "疯狂手指-根本停不下来,玩过之后我的手指已经不是我的了!"

}

document.getElementById("share").style.display="";

window.shareData.tTitle = document.title;

}

function dp_Ranking(){

window.location="http://game.weixine.net/fksz/index.html";

}

function showAd(){

}

function hideAd(){

}

document.addEventListener('WeixinJSBridgeReady', function onBridgeReady() {

WeixinJSBridge.on('menu:share:appmessage', function(argv) {

WeixinJSBridge.invoke('sendAppMessage', {

"img_url": window.shareData.imgUrl,

"link": window.shareData.timeLineLink,

"desc": window.shareData.tContent,

"title": window.shareData.tTitle

}, onShareComplete);

});

WeixinJSBridge.on('menu:share:timeline', function(argv) {

WeixinJSBridge.invoke('shareTimeline', {

"img_url": window.shareData.imgUrl,

"img_width": "640",

"img_height": "640",

"link": window.shareData.timeLineLink,

"desc": window.shareData.tContent,

"title": window.shareData.tTitle

}, onShareComplete);

});

}, false);

640

再玩一次炫耀一下

function dp_submitScore(score){

dp_share(score);

/*

if(score<40){

if (confirm("")){

myCRdata.score = score;

myCRdata.scoreName = score+"步";

dp_share(score);

}

}

*/

}

function onShareComplete(res) {

document.location.href = mebtnopenurl;

}

var initial = 1000;

var count = initial;

var counter; //10 will run it every 100th of a second

var state = 0;

var total = 0;

if (localStorage.max) {

$('#best').html( '最好成绩:' + localStorage.max + ' 次');

}

function timer() {

if (count <= 0) {

clearInterval(counter);

state = 0;

$('#result_panel').show();

if ( !localStorage.max || parseInt(localStorage.max) < total) {

localStorage.max = total;

$('#best').html( '最好成绩:' + localStorage.max + ' 次');

}

localStorage.max = parseInt(localStorage.max) > total ? localStorage.max: total;

return;

}

count--;

displayCount(count);

}

function displayCount(count) {

var res = count / 100;

document.getElementById("timer").innerHTML = res.toPrecision(count.toString().length) + " 秒";

}

$(document).on('touchmove', function(e) {

e.preventDefault();

})

$('#button').on('touchstart', function () {

if (!state) {

state = 1;

counter = setInterval(timer, 10);

}

this.classList.add('active');

});

$('#button').on('touchend', function () {

if (state) {

total++;

$('#result').html(total + ' 次');

}

this.classList.remove('active');

});

// $('#stop').on('click', function () {

// clearInterval(counter);

// });

function reset() {

count = initial;

total = 0;

state = 0;

$('#result').html(total + ' 次');

$('#timer').html(10 + ' 秒');

}

$('#reset').on('touchend', function () {

reset();

$('#result_panel').hide();

});

$('#doShare').on('touchend', function () {

dp_share(total);

$('#result_panel').hide();

reset();

});

displayCount(initial);

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值