»ðÐÇÈËдµÄjavascript½Å±¾
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>Wanna tell her - interactive DHTML </title>
<meta http-equiv="imagetoolbar" content="no">
<style type="text/css">
html {
overflow: hidden;
}
body {
position: absolute;
margin: 0px;
padding: 0px;
background: #fff;
width: 100%;
height: 100%;
}
#screen {
position: absolute;
left: 10%;
top: 10%;
width: 80%;
height: 80%;
background: #fff;
}
#screen img {
position: absolute;
cursor: pointer;
width: 0px;
height: 0px;
-ms-interpolation-mode:nearest-neighbor;
}
#bankImages {
visibility: hidden;
}
#FPS {
position: absolute;
right: 5px;
bottom: 5px;
font-size: 10px;
color: #666;
font-family: verdana;
}
</style>
<script type="text/javascript">
/* ==== Easing function ==== */
var Library = {};
Library.ease = function () {
this.target = 0;
this.position = 0;
this.move = function (target, speed) {
this.position += (target - this.position) * speed;
}
}
var tv = {
/* ==== variables ==== */
O : [],
fps : 0,
screen : {},
angle : {
x : new Library.ease(),
y : new Library.ease()
},
camera : {
x : new Library.ease(),
y : new Library.ease()
},
create3DHTML : function (i, x, y, z, sw, sh) {
/* ==== create HTML image element ==== */
var o = document.createElement('img');
o.src = i.src;
tv.screen.obj.appendChild(o);
/* ==== 3D coordinates ==== */
o.point3D = {
x : x,
y : y,
z : new Library.ease(),
sw : sw,
sh : sh,
w : i.width,
h : i.height
};
o.point3D.z.target = z;
/* ==== push object ==== */
o.point2D = {};
tv.O.push(o);
/* ==== on mouse over event ==== */
o.onmouseover = function () {
if (this != tv.o) {
this.point3D.z.target = tv.mouseZ;
tv.camera.x.target = this.point3D.x;
tv.camera.y.targ
Ïà¹ØÎĵµ£º
ugmbbc·¢²¼ÓÚ 2009-11-14 09:41:43| 7628 ´ÎÔĶÁ ×ÖÌ壺´ó С ´òÓ¡Ô¤ÀÀ
var ReTitle = '»Ø¸´:Google ÅÅÃûÖÐµÄ 10 ¸ö×îÖøÃûµÄ JavaScript ¿â';
¸ÐлCOMSHARP CMSµÄͶµÝ
ÐÂÎÅÀ´Ô´:tripwiremagazine.com
JavaScript ÊÇ Web ¿ª·¢ÓëÉè¼ÆÖв»¿É»òȱµÄ¶«Î÷£¬²»¹ÜÊÇÒ»¸ö¼òµ¥µÄÍøÒ³»¹ÊÇÒ»¸öרҵµÄÕ¾µã£¬Ò²²»¹ÜÄãÊǸßÊÖ»¹ÊDzËÄñ ......
Jsѧϰ£¨ËÄ£©
Èç¹ûµ±Ç°ÕýÔÚÖ´ÐеÄÊÇÒ»¸ö·½·¨£¬ÔòÖ´ÐÐÉÏÏÂÎľÍÊǸ÷½·¨Ëù¸½ÊôµÄ¶ÔÏó£¬Èç¹ûµ±Ç°ÕýÔÚÖ´ÐеÄÊÇÒ»¸ö´´½¨¶ÔÏ󣨾ÍÊÇͨ¹ý new À´´´½¨£©µÄ¹ý³Ì£¬Ôò´´½¨µÄ¶ÔÏó¾ÍÊÇÖ´ÐÐÉÏÏÂÎÄ¡£
Èç¹ûÒ»¸ö·½·¨ÔÚÖ´ÐÐʱûÓÐÃ÷È·µÄ¸½ÊôÓÚÒ»¸ö¶ÔÏó£¬ÔòËüµÄÖ´ÐÐÉÏÏÂÎÄÊÇÈ«¾Ö¶ÔÏ󣨶¥¼¶¶ÔÏ󣩣¬µ«Ëü²»Ò»¶¨¸½ÊôÓÚÈ«¾Ö¶ÔÏó¡£È«¾Ö¶ÔÏóÓɵ±Ç°» ......
ÔÚ½ñÌìÍøÂ翪·¢·½Ã棬JavaScriptÆðÁ˺ܹؼüµÄ×÷Óã»ÏñjQuery, MooTools, PrototypeµÈµÈJavaScript¿ò¼ÜÒÔ¼°ÆäËüJavaScriptÀà¿âÈÃÎÒÃǵÄÉú»îÇáËÉÁ˲»ÉÙ¡£µ«ÊÇËæ×ÅRich Internet Applications(RIA)µÄÃæÊÀ¼°Ñ¸ËÙÓ¦Óã¬Êéд¸üÇ¿´ó£¬¸ü¼áʵ¿É¿¿µÄJavaScriptµÄÐèÒªÈÕÒæÆÈÇС££¨51CTO±à¼£ºµ±Ç°Web¿ª·¢½çÆÕ±éÈÏΪJavaScript½«»á³ÉΪ ......
Õ⼸ÌìÔÚѧJavaScriptµÄ»ù´¡ÖªÊ¶£¬¾Í°Ñ»ù´¡µÄ֪ʶÕûÀíһϡ£
1¡¢JavaScriptµÄËÄÖÖ»ù±¾µÄÊý¾ÝÀàÐÍ£ºÊýÖµ£¨ÕûÊýºÍʵÊý£©¡¢×Ö·û´®ÐÍ£¨ÓÓ”»òÕß‘’À¨ÆðÀ´µÄ×Ö·û»òÕßÊýÖµ£©¡¢²¼¶ûÐÍ£¨true»òfalse£©¡¢¿ÕÖµ¡£
2¡¢JavaScriptµÄ±äÁ¿
ÉùÃ÷±äÁ¿£º±äÁ¿Ôڽű¾ÖеÚÒ»´Î³öÏÖʱºòÔÚÉùÃ÷ÖУ¨var£©£¬±äÁ¿µÄ ......
6¡¢»ùÓÚ¶ÔÏóµÄJavaScriptÓïÑÔ
JavaScriptÊÇ»ùÓÚ¶ÔÏóµÄµÄÓïÑÔ£¬²»ÏñÃæÏò¶ÔÏóÓгéÏ󡢼̳С¢ÖØÔصÈÓйØÃæÏò¶ÔÏóµÄ¹¦ÄÜ£¬µ«ÊÇËü»¹ÊǾßÓÐÃæÏò¶ÔÏóµÄ»ù±¾ÌØÕ÷£¬Ëü¿ÉÒÔ¸ù¾ÝÐèÒª´´½¨×Ô¼ºµÄ¶ÔÏ󣬴Ӷø½øÒ»²½À©´óJavaScriptµÄÓ¦Ó÷¶Î§£¬ÔöÇ¿±àд¹¦ÄÜÇ¿´óµÄWebÎĵµ¡£
¶ÔÏóµÄ»ù´¡ÖªÊ¶£º
¶ÔÏóÊÇÓÉÊôÐԺͷ½·¨Á½¸ö»ù±¾ÔªËØ×é³É¡£Ò»¸ö¶Ô ......