Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö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»ù±¾Êý¾Ý½á¹¹ [2]

JavaScriptÌṩ½Å±¾ÓïÑԵıà³ÌÓëC++·Ç³£ÏàËÆ£¬ËüÖ»ÊÇÈ¥µôÁË£ÃÓïÑÔÖÐÓйØÖ¸ÕëµÈÈÝÒײúÉúµÄ´í
Î󣬲¢ÌṩÁ˹¦ÄÜÇ¿´óµÄÀà¿â¡£¶ÔÓÚÒѾ­¾ß±¸£Ã++»ò£ÃÓïÑÔµÄÈËÀ´Ëµ£¬Ñ§Ï°JavaScript½Å±¾ÓïÑÔÊÇÒ»¼þ·Ç³£ÇáËÉÓä¿ìµÄÊ¡£
Ò»¡¢JavaScript´úÂëµÄ¼ÓÈë
¡¡¡¡JavaScriptµÄ½Å±¾°üÀ¨ÔÚHTMLÖУ¬Ëü³ÉΪHTMLÎĵµµÄÒ»²¿·Ö¡£ÓëHTML±êʶÏà½áºÏ£¬ ......

JavaScript¶ÔÏóϵͳµÄʹÓà [6]

ʹÓÃä¯ÀÀÆ÷µÄÄÚ²¿¶ÔÏóϵͳ,
¿ÉʵÏÖÓëHTMLÎĵµ½øÐн»»¥¡£ËüµÄ×÷ÓÃÊǽ«Ïà¹ØÔªËØ×éÖ¯°ü×°ÆðÀ´£¬Ìṩ¸ø³ÌÐòÉè¼ÆÈËԱʹÓ㬴Ӷø¼õÇá±à³ÌÈ˵ÄÀͶ¯£¬Ìá¸ßÉè¼ÆWebÒ³ÃæµÄÄÜÁ¦¡£
Ò»¡¢
ä¯ÀÀÆ÷¶ÔÏó²ã´Î¼°ÆäÖ÷Òª×÷ÓÃ
¡¡¡¡³ýÁËÇ°ÃæÌáµ½¹ýµÄÎĵµdocument¶ÔÏóÍ⣬Navigatorä¯ÀÀÆ÷Öл¹ÌṩÁË´°¿Ú£¨Window£©¶ÔÏóÒÔ¼°ÀúÊ·£¨History£©ºÍÎ»Ö ......

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

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

CSS+JavaScriptʵÏֲ㼶ÏÔʾÒþ²Ø

/***************************by
garcon1986********************************/
¸ÐлCSDNµÄshan1119 °ïÎÒ½â¾öJavascript²¿·ÖµÄ´íÎó¡£
<mce:script language="JavaScript"><!--
function toggle(id,id2,id3) {
var state = document.getElementById(id).style.display;
if (state == 'block') {
......

javascript ¼¼ÇÉ

//×Ô´øµÄ´òÓ¡Ô¤ÀÀ WebBrowser.ExecWB(1,1) ´ò¿ª  
Web.ExecWB(2,1) ¹Ø±ÕÏÖÔÚËùÓеÄIE´°¿Ú£¬²¢´ò¿ªÒ»¸öд°¿Ú  
Web.ExecWB(4,1) ±£´æÍøÒ³  
Web.ExecWB(6,1) ´òÓ¡  
Web.ExecWB(7,1) ´òÓ¡Ô¤ÀÀ  
Web.ExecWB(8,1) ´òÓ¡Ò³ÃæÉèÖà 
Web.ExecWB(10,1) ²é¿´Ò ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ