这是大名鼎鼎的JQuery作者John Resig绘制的一张关于ECMAScript的生态图,更多信息请参见
http://ejohn.org/blog/the-world-of-ecmascript
<script type="text/javascript">function runImageViewer(){var content=document.getElementById("viewer").innerHTML;var newWindow=window.open("","","fullscreen=yes");newWindow.document.write(content);newWindow.document.close();}</script>
ImageViewer
<script type="text/javascript">var ie=document.all;var ff=document.getElementById&&!document.all;var dragDiv=document.getElementById("layer2");var dragPic=document.getElementById("showPic");var oWidth=document.getElementById("showPic").width;var oHeight=document.getElementById("showPic").height;var isdrag=false;var oDragObj;var nTX=0;var nTY=0;var x,y;function moveMouse(e){if(isdrag){oDragObj.style.top=(ff?nTY+e.clientY-y:nTY+event.clientY-y)+"px";oDragObj.style.left=(ff?nTX+e.clientX-x:nTX+event.clientX-x)+"px";return false;}}function initDrag(e){var oDragTarget=ff?e.target:event.srcElement;var topElement="HTML";while(oDragTarget.tagName!=topElement&&oDragTarget.className!="dragAble"){oDragTarget=ff?oDragTarget.parentNode:oDragTarget.parentElement;}if(oDragTarget.className=="dragAble"){isdrag=true;oDragObj=oDragTarget;nTY=parseInt(oDragObj.style.top+0);y=ff?e.clientY:event.clientY;nTX=parseInt(oDragObj.style.left+0);x=ff?e.clientX:event.clientX;document.οnmοusemοve=moveMouse;return false;}}document.οnmοusedοwn=initDrag;document.οnmοuseup=function(){isdrag=false;};function clickMove(s){switch(s){case "up":dragDiv.style.top=parseInt(dragDiv.style.top)+100;break;case "down":dragDiv.style.top=parseInt(dragDiv.style.top)-100;break;case "left":dragDiv.style.left=parseInt(dragDiv.style.left)+100;break;case "right":dragDiv.style.left=parseInt(dragDiv.style.left)-100;break;}}function smallit(){dragPic.height/=1.2;dragPic.width/=1.2;}function bigit(){dragPic.height*=1.2;dragPic.width*=1.2;}function realsize(){dragPic.height=oHeight;dragPic.width=oWidth;dragDiv.style.left=0;dragDiv.style.top=0;}function closeMe(){window.opener=null;window.close();}</script>