»ðÐÇÈËдµÄ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
Ïà¹ØÎĵµ£º
JavaScript ÊÇÒ»Öַdz£Áé»îµÄÃæÏò¶ÔÏó³ÌÐòÉè¼ÆÓïÑÔ£¬ËüÓ봫ͳµÄÇ¿ÀàÐ͵ÄÃæÏò¶ÔÏó³ÌÐòÉè¼ÆÓïÑÔ£¨Èç C++£¬Java£¬C# µÈ£©Óкܴó²»Í¬£¬ËùÒÔҪʵÏÖÈç C++¡¢java¡¢C# µ±ÖеÄÒ»Ð©ÌØÐÔ¾ÍÐèÒª»»Ò»ÖÖ˼¿¼·½Ê½À´½â¾ö¡£½ñÌìÖ÷ÒªÌÖÂÛÈçºÎÔÚ JavaScript ½Å±¾ÖÐʵÏÖÊý¾ÝµÄ·â×°£¨encapsulation£©¡£
Êý¾Ý·âװ˵µÄ¼òµ¥µã¾ÍÊǰѲ»Ï£Íûµ÷ÓÃÕß¿´ ......
ÀûÓÃÔÐͼ̳еĹؼüÓÐÁ½²½²Ù×÷£º
Ê×ÏÈ´´½¨Ò»¸ö¸¸ÀàµÄʵÀý»¯¶ÔÏó£¬È»ºó½«¸Ã¶ÔÏ󸳸ø×ÓÀàµÄ prototype ÊôÐÔ¡£
ÕâÑù£¬¸¸ÀàÖеÄËùÓй«ÓÐʵÀý³ÉÔ±¶¼»á±»×ÓÀà¼Ì³Ð¡£²¢ÇÒÓà instanceof ÔËËã·ûÅжÏʱ£¬×ÓÀàµÄʵÀý»¯¶ÔÏó¼ÈÊôÓÚ×ÓÀ࣬ҲÊôÓÚ¸¸Àà¡£
È»ºó½«×ÓÀà±¾Éí¸³Öµ¸øËüµÄ prototype µÄ constructor ÊôÐÔ¡££¨×¢Ò⣺ÕâÀ︳ֵµÄʱº ......
Jsѧϰ£¨Èý£©
ÁíÍâÒ»ÖÖ·½Ê½Í¨¹ýÖ±½ÓʵÀý»¯ÄäÃûº¯Êý·½Ê½À´´´½¨´øÓÐ˽Óо²Ì¬³ÉÔ±µÄÀàµÄÀý×Ó¸úÉÏÃæµÄÀý×ÓºÜÏàËÆ£º
new function() {
// private static fields
var s_first = 1;
var s_second = 2;
// private static methods
&n ......
1. jQuery tablesorter
http://tablesorter.com/docs/
2. Table sorting with Prototype
http://tetlaw.id.au/view/blog/table-sorting-with-prototype/
3. Sorttable
http://www.kryogenix.org/code/browser/sorttable/
4. Table Sorting Javascript
http://yoast.com/articles/sortable-table/
5. Sorting Tabl ......