神奇的读心术
神奇的读心术。之前在MFC版上看到的。
做个web版的给大家娱乐一下。
祝大家中秋节快乐!
请知道底细的童鞋不要说出来,给神奇的大魔法师slowhand留点面子。
(回复“我知道了”就可以)

玩法:心中默想任意一个两位数,例如:23。然后个数与十位相加:2+3=5。
用这个两位数23减相加的和5,得到23-5=18在页面中找到18对应的图标,记在心中。
然后点击占卜按钮,见证奇迹的时刻到了。
代码:
做个web版的给大家娱乐一下。
祝大家中秋节快乐!
请知道底细的童鞋不要说出来,给神奇的大魔法师slowhand留点面子。
(回复“我知道了”就可以)

玩法:心中默想任意一个两位数,例如:23。然后个数与十位相加:2+3=5。
用这个两位数23减相加的和5,得到23-5=18在页面中找到18对应的图标,记在心中。
然后点击占卜按钮,见证奇迹的时刻到了。
代码:
<html>
<body>
<style type="text/css">
.table_back{width:320px;height:480px;border:0px}
.floor{border:0px solid gray;font-size:12px;line-height:24px;}
</style>
<div id="NT">神奇的占卜</div>
<script type="text/javascript">
/*
标题:神奇的占卜
设计:宁涛
日期:2010年9月20日
*/
function Prediction(options) {
var self = this;
for (var p in options) this[p] = options[p];
this.parent = this.parent || document.body;
this.rowCount = this.rowCount || 20;
this.colCount = this.colCount || 5;
this.picMax = this.picMax || 20;
this.table_back = document.createElement("table");
this.table_back.className = "table_back";
this.table_back.cellPadding = "0px";
this.table_back.cellSpacing = "0px";
this.floors = {};
for (var i = 0; i < this.rowCount; i++) {
var tr = this.table_back.insertRow(-1);
for (var j = 0; j < this.colCount; j++) {
var td = tr.insertCell(-1);
td.className = "floor";
this.floors[[i, j]] = {td: td};
td.innerHTML = " ";
}
}
this.parent.appendChild(this.table_back);
this.div_Intro = document.createElement("div");
this.div_Intro.innerHTML =
"玩法:心中默想任意一个两位数,例如:23。<br>"+
"然后个数与十位相加:2+3=5。<br>"+
"用这个两位数23减相加的和5,得到23-5=18。<br>"+
"在页面中找到18对应的图标,记在心中。<br>"+
"然后点击占卜按钮,见证奇迹的时刻到了。<br>";
this.parent.appendChild(this.div_Intro);
this.button_Predict = document.createElement("input");
this.button_Predict.type = "button";
this.button_Predict.value = "占卜";
this.button_Predict.onclick = function() {
self.Predict();
};
this.parent.appendChild(this.button_Predict);
this.font_Result = document.createElement("font");
this.font_Result.face = "webdings";
this.font_Result.size = "5px";
this.font_Result.style.width = "50px";
var TmpClr = Math.floor(0xFFFFFF / (this.picMax+1)).toString(16);
this.font_Result.color = "000000".substr(TmpClr.length) + TmpClr;
this.font_Result.innerHTML = " ";
this.parent.appendChild(this.font_Result);
this.button_Replay = document.createElement("input");
this.button_Replay.type = "button";
this.button_Replay.value = "刷新";
this.button_Replay.onclick = function() {
self.replay();
};
this.parent.appendChild(this.button_Replay);
this.replay();
}
Prediction.prototype = {
replay: function(){
this.picOffSet = 40 + Math.floor( (120-this.picMax) * Math.random() );
for(var i = 0; i < this.rowCount; i++) {
for(var j = 0; j < this.colCount; j++) {
this.floors[[i, j]].td.innerHTML = this.NewCell((this.rowCount-i-1)+(this.colCount-j-1)*this.rowCount);
}
}
this.font_Result.innerHTML = " ";
},
NewCell: function(cell_index) {
var RandNum = Math.floor(this.picMax * Math.random());
if((0==(cell_index%9)) && (cell_index<90)) RandNum=0;
var TmpClr = Math.floor(0xFFFFFF * (RandNum+1) / (this.picMax+1)).toString(16);
TmpClr = "000000".substr(TmpClr.length) + TmpClr;
var TmpStr = cell_index;
TmpStr += "<font face=\"webdings\" size=\"5px\" color=\"#";
TmpStr += TmpClr
TmpStr += "\">";
TmpStr += String.fromCharCode(this.picOffSet+RandNum);
TmpStr += "<\/font>";
return TmpStr;
},
Predict: function() {
this.font_Result.innerHTML = String.fromCharCode(this.picOffSet);
}
}
function $(id) { return document.getElementById(id); }
new Prediction({parent: $("NT")});
</script>
</body>
</html>
...全文
相关推荐
神奇的读心术软件
神奇的读心术软件
易语言神奇读心术
易语言神奇读心术源码,出题
神奇读心术HTML5游戏源码
神奇读心术HTML5游戏源码,运行需要服务器环境,已经反复测试,放心使用。
魔力水晶球吉普赛人神奇读心术
魔力水晶球吉普赛人神奇读心术系统结构:填充,初始化,结果显示,======窗口程序集1||||------__启动窗口_创建完毕||||------填充||||------初始化||||------结果显示||||------_图片框_zb_鼠标左键被按
JavaScript网页读心术
:::读心术::: “吉普赛人祖传的神奇读心术.它能测算出你的内心感应” 提示: 任意选择一个两位数(或者说,从10~99之间任意选择一个数),把这个数的十位与个位相加,再把任意选择的数减去这个和。例如:你选的数是23,然后2+3=5,然后23-5=18 在图表中找出与最后得出的数所相应的图形,并把这个图形牢记心中,然后点击水晶球。你会发现,水晶球所显示出来的图形就是你刚刚心里记下的那个图形。


