Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

½áºÏcanvas½øÐÐjavascriptÐÔÄܲâÊÔ

ÔÚ¶Ô³ÌÐò½øÐÐÐÔÄܲâÊÔʱÐèÒª¿¼Âǵ½²»Í¬¹æÄ£ÒÔ¼°²»Í¬Ëã·¨µÄЧÂʵIJ»Í¬
ÏÂÃæµÄÍøÒ³ÊÇÒ»¸ö¶ÔÅÅÐòËã·¨µÄÐÔÄܲâÊÔ£¬¹æÄ£¾ÍÊÇÊý×éµÄ³¤¶È£¬¶ø²âÊÔµÄÁ½¸öº¯Êý·Ö±ðÊÇÊÖ¶¯ÊµÏֵĿìËÙÅÅÐòËã·¨ºÍjavascriptÄÚÖõÄÅÅÐòº¯Êý¡£
<!DOCTYPE window PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<title>Performance</title>
<mce:script type="text/javascript"><!--
var $ = function(id) {
return document.getElementById(id);
};
$.extend = function(target, object) {
for (var i in object) {
target[i] = object[i];
}
return target;
};
// --></mce:script>
<mce:script type="text/javascript" src="performance.js" mce_src="performance.js"></mce:script>
<mce:script type="text/javascript"><!--
var a;
function qsort(l, u) {
if (l >= u) {
return undefined;
}
var i = l, j = u - 1, v = a[u], t;
while (1) {
while (a[i] < v) { i += 1; }
while (a[j] > v) { j -= 1; }
if (i >= j) {
break;
}
t = a[i];
a[i] = a[j];
a[j] = t;
i += 1;
j -= 1;
}
t = a[i];
a[i] = v;
a[u] = t;
qsort(l, j);
qsort(i + 1, u);
};
performance({
// resetº¯ÊýÔÚÿ´Î¸Ä±ä¹æģʱ±»µ÷Ó㬲ÎÊýxÊǹæÄ£
// Éú³ÉÒ»¸ö³¤¶ÈΪxµÄËæ»úÊý×é
reset: function(x) {
a = [];
while (x--) {
a[x] = ~~(Math.random() * x);
}
},
func: [
function quicksort(x) {
qsort(0, x);
},
function nativesort(x) {
a.sort();
}
],
dimensionStart: 1,
dimensionEnd: 1000,
dimensionIncrement: 1,
});
// --></mce:script>
</head>
<body>
<canvas id="canvas" width="1400" height="800"></canvas>
</body> 
performance.js°üº¬Ö÷ÒªµÄ½øÐвâÊԵĴúÂë¡£ÔÚ¿ØÖÆ̨ÖÐÊäÈëperformance.start()¿ªÊ¼½øÐвâÊÔ£¬¿ÉÒÔ¿´µ½canvasÉÏ´Ó×óµ½ÓÒ³öÏÖºÚÉ«ÓëºìÉ«µÄµã£¬ºÚÉ«´ú±íquicksort£¬¶øºìÉ«´ú±ínativesort
¿ÉÒÔËæʱperformance.end()ÖÕÖ¹²âÊÔ
ͼÏñÖеĺáÖá±íʾ¹æÄ££¬¶ø×ÝÖá±íʾÔËÐеÄ


Ïà¹ØÎĵµ£º

¼òµ¥µÄÕýÔò±í´ïʽ JavaScript·­ÒëÆ÷

×î½ü£¬ÎҲο¼£¬¸ù¾ÝÕýÔò±í´ïʽ¹¹½¨DFA£¨È·¶¨µÄÓÐÇî×Ô¶¯»ú£©µÄ¼¼Êõ£¬Íê³ÉÁËÒ»¸ö´ÓÕýÔò±í´ïʽµ½JavaScriptµÄ·­ÒëÆ÷¡£
·­ÒëÆ÷ÊÇÕë¶ÔchromeºÍfirefoxÉè¼ÆµÄ£¬Ã»ÓÐÔÚÆäËûä¯ÀÀÆ÷ÖвâÊÔ¹ý¡£
Google CodeÉϵÄÔ´´úÂ룺http://code.google.com/p/nephotools/source/browse/#svn/trunk/regexpQuery
regexpQuery.jsÖж¨ÒåÁËregexpQue ......

JavaScript´°¿Ú¼°ÊäÈëÊä³ö [7]

JavaScriptÊÇ»ùÓÚ¶ÔÏóµÄ½Å±¾±à³ÌÓïÑÔ£¬ÄÇôËüµÄÊäÈëÊä³ö¾ÍÊÇͨ¹ý¶ÔÏóÀ´Íê³ÉµÄ¡£ÆäÖÐÓйØÊäÈë¿Éͨ
¹ý´°¿Ú£¨Window£©¶ÔÏóÀ´Íê³É£¬¶øÊä³ö¿Éͨ¹ýÎĵµ£¨document£©¶ÔÏóµÄ·½·¨À´ÊµÏÖ¡£
Ò»¡¢´°¿Ú¼°ÊäÈëÊä³ö
Çë
¿´ÏÂÃæÀý×Ó£º
<HTML>
<Head>
<script
languaga="JavaScript">
Var test=window. ......

ѧϰjavascriptÍƼöÍøÕ¾

/***************************by
garcon1986********************************/
 
Java is to
JavaScript what Car is to Carpet
ÂÛ̳½»Á÷£º´óÐ͵Äweb¿ª·¢ÉçÇø
http://www.webdeveloper.com/forum/index.php
W3CschoolsÖÐÎÄÕ¾£º¿ª·¢ÕßµÄʵÓÃ+ѧϰÍøÕ¾
http://www.w3school.com.cn/js/index.asp
javascript³ ......

JavaScript ͼƬÎÞ·ì¹ö¶¯

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charse ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ