【HTML小游戏】找色差游戏,没事儿可以解解闷(附源代码)
如图所示,就是找不同,简单的一个休闲小游戏链接: https://pan.baidu.com/s/1ompL2trC1e6tfx4tpaePaw 提取码: ph9v 复制这段内容后打开百度网盘手机App,操作更方便哦
附上一个小技巧(逃
function find() {
var box = document.getElementById("box");
var blocks = box.childNodes;
var i, c, n, t;
for (i = 0; i < blocks.length - 1; i++) {
c = blocks.style["backgroundColor"];
n = blocks.style["backgroundColor"];
if (c != n)
break;
};
if (i == 0)
t = blocks.style["backgroundColor"];
else
t = blocks.style["backgroundColor"];
if (c == t)
return i + 1;
else
return i;
};
setInterval(function () {
var crazyModel = true;
if (crazyModel) {
//疯狂屠戮模式
document.getElementById("box").childNodes.click();
} else {
//辅助瞄准模式
document.getElementById("box").childNodes.style.border = "5px solid black";
}
}, 100);//这个值越小,屠戮模式越疯狂……
谢谢楼主分享,先收藏了。
支持楼主,谢谢分享。 谢谢分享! 6666666666 感谢楼主分享 6666 谢谢大佬 谢谢@Thanks! 谢谢大佬分享
页:
[1]
2