-
2010-01-28
JavaScript可否多线程? 深入理解JavaScript定时机制
作者 barton 提交于 2010-1-19 • 分类 JavaScript, 前端技术
JavaScript的setTimeout与setInterval是两个很容易欺骗别人感情的方法,因为我们开始常常以为调用了就会按既定的方式执行, 我想不少人都深有同感, 例如
setTimeout(function(){ alert(’你好!’);}, 0); setInterval(callbackFuncti... -
2007-01-04
some interesting link (recently browsed)
-
2007-01-04
delay javascriipt loading
javascript is powerful, you can "Download Javascript as and when required, instead of downloading it all on page load", you can "You can load Javascript from external domains"..., you can ... oh, it is amazing
ref to http://ajaxpatterns.org/wiki/index.php?title=On-Demand_Javascript
-
TrueCode - The stuff school didn't teach you
author: Joshua Gertzen
All the wacky and crazy things that I uncover while spelunking in the depths of software programming. My thoughts on bad code, good code, bad design, good design and other geeky goodness!
Tuesday, August 15, 2006 -
2006-12-15
Classical Inheritance in JavaScript
JavaScript is a class-free, object-oriented language, and as such, it uses prototypal inheritance instead of classical inheritance. This can be puzzling to programmers trained in conventional object-oriented languages like C++ and Java. JavaScript's prototypal inheritance has more expressive power than classical inheritance, as we will see -
Comparing
escape(),encodeURI(), andencodeURIComponent()The purpose of this article is to examine the differences between these three methods and decide on the appropriate times to use each.
escape... -
2006-12-11
The apply Method(RT)
As explained in the previous page, JavaScript 1.3 includes two new methods for theFunctionobject,call()andapply(). Theapply()method is a variation on thecall()method. Theapply()method lets ... -
adapted from http://www.webreference.com/js/column79/
In this column we embark on a short series about Object-Oriented Programming (00P) with JavaScript. In Part I of this series, we will cover the fundamentals. We will show you how JavaScript fulfills one of the most important requirements from an object-oriented language: inheritance. The examples in this part will also demonstrate the other requirement: encapsulation. We'll leave the third requirement, polymorphism, to other parts of this series.
-
2006-12-08
Mission Impossible--Mouse Position(RT)
-
2006-12-07
自定义Title
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>JSP爱好者|www.jspfans.cn|---自定义Title</title>
</head>
<body>
<p><B>自定义title</B>(IE):把鼠标放在下面的文字上查看效果</p>
<span title="Javascript" title="">默认效果</span><br><br>
<span title="<marquee style='width:100px;'>http://linkweb.cn/Js</marquee>" altbg="red" altcolor="yellow" altborder="yellow">滚动字幕</span><br><br>
<span title="<img src='http://linkweb.cn/Js/Images/Logo.gif' border='0'>" altbg="#F7F7F7" altcolor="#999999" altborder="#CCCCCC">图片</span><br><br>
<span title="<i style='font-size:24pt;font-family:verdana;'>http://linkweb.cn/Js</i>" altbg="green" altcolor="yellow" altborder="darkgreen">大字体</span><br><br>
<div style="display:none;border:1px solid #000000;background-color:#FFFFCC;font-size:12px;position:absolute;padding:2;" id=altlayer></div>
<SCRIPT LANGUAGE="JavaScript">
<!--
document.body.onmousemove=quickalt;
document.body.onmouseover=getalt;
document.body.onmouseout=restorealt;
var tempalt='';
function getalt(){
if(event.srcElement.title && (event.srcElement.title!='' || (event.srcElement.title=='' && tempalt!=''))){
altlayer.style.left=event.x;
altlayer.style.top=event.y+20;
altlayer.style.display='';
tempalt=event.srcElement.title;
tempbg=event.srcElement.altbg;
tempcolor=event.srcElement.altcolor;
tempborder=event.srcElement.altborder;
event.srcElement.title='';
altlayer.innerHTML=tempalt;
if (typeof(tempbg)!="undefined"){altlayer.style.background=tempbg}else{altlayer.style.background="infobackground"}
if (typeof(tempcolor)!="undefined"){altlayer.style.color=tempcolor}else{altlayer.style.color=tempcolor="infotext"}
if (typeof(tempborder)!="undefined"){altlayer.style.border='1px solid '+tempborder;}else{altlayer.style.border='1px solid #000000';}
}
}
function quickalt(){
if(altlayer.style.display==''){
altlayer.style.left=event.x;
altlayer.style.top=event.y+10;
}
}
function restorealt(){
event.srcElement.title=tempalt;
tempalt='';
altlayer.style.display='none';
}
//-->
</SCRIPT>
</body>
</html>







