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

javascriptÖÐsetTimeout()º¯Êý

javascriptÖÐsetTimeout()º¯Êý
´ó¼Ò¶¼ÖªµÀjavascriptÖеÄsetTimeput()º¯ÊýµÄ×÷Óã¬Ò»°ã»áÓÃËûÀ´´¦ÀíһЩÁ¬ÐøµÄÊÂÇ飬ÃÇÏÈ¿´Ò»¸öÀý×Ó£º
<head>
    <script>
        function init()
        {
            setTimeout("init2()",0);
            alert("1");
        }
        function init2()
        {
            alert("2");
        }
    </script>
</head>
<body onload="init()">
</body> 
Ò²ÐíºÜ¶àÈËÈÏΪ½á¹ûÊÇ£º2 1£¬ ¶øÇ¡Ç¡½á¹ûÊÇ£º1  2 ¡£ÕâÊÇΪʲôÄØ£¿Ã÷Ã÷ÑÓ³Ùʱ¼äÉèÖõÄÊÇ0£¬Ó¦¸ÃÊÇÁ¢¿ÌÏÈÖ´ÐÐinit2()°¡£¿ÎÒÃÇ¿ÉÒÔÕâÑùÈÏΪ£¬setTimeout()º¯Êý»á×Ô¼ºÖØÐÂÉêÇëÒ»¸ö¶ÑÕ»¿Õ¼ä£¬¶ø²»ÊôÓÚµ±Ç°º¯Êýinit()µÄ¶ÑÕ»¿Õ¼ä£¬ËùÒÔinit()ÏÈÈëÕ»£¬alert("1")µÚ2¸öÈëÕ»£¬µ±init()º¯ÊýÖ´ÐÐÍêºó£¬setTimeout()²ÅÖ´ÐС£
 
µ±È»ÕâÀïûÓÐÉæ¼°µ½²ÎÊý´«µÝ,ÔÙ¿´Õâ¸öÀý×Ó£º
<head>
<script>
  var rgbcolor=new Array(3);
  var whichtr=0;
  function changeColor(wh)
  {
  whichtr=wh;
  for(var i=0;i<3;i++)
  {rgbcolor[i]=Math.ceil(Math.random()*255);}
  trID[whichtr].style.backgroundColor="rgb("+rgbcolor[0]+","+rgbcolor[1]+","+rgbcolor[2]+")";
  setTimeout("changeColor("+whichtr+")",1000);
  }
  
</script>
</head> <body>
<table border="1" height="400" width="500" align="center" cellspacing="0">
  <tr onmousedown="changeColor(0)" id="trID"><td>0</td></tr


Ïà¹ØÎĵµ£º

javascript¼¼Êõ¼¼ÇÉ´óÈ«

//¸÷Öֳߴç
s  +=  "\r\nÍøÒ³¿É¼ûÇøÓò¿í£º"+  document.body.clientWidth;  
s  +=  "\r\nÍøÒ³¿É¼ûÇøÓò¸ß£º"+  document.body.clientHeight;  
s  +=  "\r\nÍøÒ³¿É¼ûÇøÓò¸ß£º"+  document.body.offs ......

ѧϰ¡¶JavaScript¸ß¼¶³ÌÐòÉè¼Æ¡·Ñ§Ï°±Ê¼Ç£¨Ò»£©

      ½øÈëеÄÏîÄ¿×éºó£¬·¢ÏÖ×Ô¼ºµÄ¹¦Á¦²îÔ¶ÁË£¬ËûÃÇдµÄjavaScript´úÂëÎҺܶ඼¿´²»¶®£¬ÏÖÔÚÎÒ×öjavaÇ°¶Ë¿ª·¢£¬javaScriptÊǷdz£ÖØÒªµÄ£¬ÏÖÔÚÎÒ¾ö¶¨ÖØÐÂÊ°Æð¡¶JavaScript¸ß¼¶³ÌÐòÉè¼Æ¡·Ñ§Ï°£¬³ÉΪһ¸öjavaScriptÄÜÊÖ¡£
      ¿´ÍêµÚÒ»ÕÂÎÒµ½»¹ÊǸ㲻Ã÷°×DOMµÄÒâ˼¡£ ......

Google Èýά JavaScript API ·¢²¼


O3D ÊÇÒ»¸ö¿ªÔ´µÄWeb API£¬Æä¿ÉÒÔ´´½¨Ï൱ţXµÄ»ùÓÚä¯ÀÀÆ÷µÄ¿É½»»¥Ê½µÄ3DÓ¦Óá£Õâ¸öAPIÔÚºÜÓпÉÄÜ»áÐγÉÒÔºóµÄWebÉϵÄ3DͼÐεıê×¼¡£ÏÂÃæÊÇÕâ¸öAPIµÄÖ÷Õ¾µã£º http://code.google.com/apis/o3d/ ¡£O3DÄ¿Ç°Ö§³ÖWindows, MacºÍLinuxÈýÖÖƽ̨¡£
ÏÂÃæÊÇһЩ¼òµ¥µØʹÓÃO3DµÄAPIµÄÈçºÎ´´½¨Ò»¸öÁ¢·½Ì壬¸üÏêϸµÄÄÚÈÝÇ ......

ºËÐÄJavaScript»ù´¡ 2£¨Ñ§Ï°±Ê¼Ç£©

²Î¿¼×ÊÁÏ:¡¶javascriptȨÍþÖ¸ÄϵÚÎå°æ¡·
===============±äÁ¿==============
1¡¢javaScriptÊÇÒ»ÖÖÈõÀàÐ͵ÄÓïÑÔ£¬ÓÃvarÓï¾ä¼´¿ÉÉùÃ÷Ò»¸ö±äÁ¿¡£
2¡¢Èç¹û²»ÓÃvarÓï¾äÉùÃ÷¶øÖ±½Ó¸øÒ»¸ö±äÁ¿¸³Öµ£¬ÄÇÕâ¸ö±äÁ¿½«±»ÒþʽÉùÃ÷Ϊȫ¾Ö±äÁ¿¡£
3¡¢Èç¹ûº¯ÊýÄÚ²¿ÓÃvarÓï¾äÉùÃ÷ÁËÒ»¸öÓëijȫ¾Ö±äÁ¿Í¬ÃûµÄ±äÁ¿£¬ÔòÔÚº¯ÊýÖÐÈ«¾Ö±äÁ¿±»ÆÁ±ÎÁË ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ