扒一个游戏给大家——ElvishBird

发表在    IT女(Java部落) 07-25 14:52:05

1 1361 1

在网上看到一个用html和JavaScript写的一个ElvishBird的游戏,还挺有意思就下载后看了看代码。

bird

下面是一部分代码:html的

body{
	moz-user-select: -moz-none;
	-moz-user-select: none;
	-o-user-select:none;
	-khtml-user-select:none;
	-webkit-user-select:none;
	-ms-user-select:none;
	user-select:none;
	padding:0px;
	margin:0px;
	background-color:#000;
	cursor:default;
}

下面是JavaScript代码部分

<script type="text/javascript" language="javascript">

//分享到腾讯微博
function postToQQWB(integral,docurl){  
	var _t = encodeURI('你在"淘气的小鸟(Elvish Bird)"中取得了最高'+integral+'分!欢迎小朋友们来体验!');  
	var _url = encodeURI(docurl); 
	var _u = 'http://v.t.qq.com/share/share.php?title='+_t+'&url='+_url;  
	window.open( _u,'转播到腾讯微博', 'width=630, height=380, top=0, left=0, toolbar=no, menubar=no, scrollbars=no, location=yes, resizable=no, status=no' );  
}
//分享到新浪微博
function postToSINAWB(integral,docurl){
	var _t = encodeURI('你在"淘气的小鸟(Elvish Bird)"中取得了最高'+integral+'分!欢迎小朋友们来体验!');
	var _url = encodeURI(docurl);    
	var _u = 'http://service.weibo.com/share/share.php?url='+_url+'&title='+_t;
	window.open( _u,'转播到新浪微博', 'width=630, height=380, top=0, left=0, toolbar=no, menubar=no, scrollbars=no, location=yes, resizable=no, status=no' );  
}

代码太长了,只贴出一部分。

体验:

老是容易死,我绝对不承认是我技术太烂,感觉柱子之间的距离太短。


登录或注册后发布评论