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

javascriptЧÂʾ­Ñé̸(Ò»)

±¾ÎÄÖ÷ÒªÊdzöÓÚÓÐÅóÓÑʹÓÃÎÒÔ­À´Ð´µÄautocompleteµÄJS¿Ø¼þ¡£µ±Êý¾ÝÁ¿´óµÄʱºò£¬»á³öÏÖЧÂʼ«ÆäÂýµÄÇé¿ö£¬ÎÒÔÚÕâ¶Îʱ¼ä×ö³öµÄһЩ²âÊÔÒ²¼°Ò»Ð©¾­Ñ飬Óë´ó¼Ò·ÖÏí£¬Èç¹ûÓдíµÄµØ·½£¬»¹ÇëÖ¸³ö¡£
¾­¹ý²âÊÔ£¬ÎÒÃǻᷢÏÖÈçϵÄÇé¿ö»òÕß˵µÄ½áÂÛ£¬Èç¹ûÄúµÄ²âÊÔ½á¹ûÓëÎҵIJ»·û£¬Çë˵Ã÷Ô­Òò£¬ÒÔ±ãÏ໥ѧϰ¡£
1£©µ±Ò»¸ö½Ï´óµÄHTML×Ö·û´®¸øµ½obj.innerHTMLʱ»á³öÏÖÂé·³¡£Ò²¾ÍÊÇ˵µ±Ò»¸ö½Ï´óµÄ×Ö·û´®ÔÚ¸³ÓèÒ»¸öElementµÄinnerHTMLʱ£¬Õâ¸ö¹ý³Ì½«¿ÉÄÜÊÇÎÒÃÇÎÞ·¨ÈÝÈ̵ġ££¨¶øÊÂʵÉÏÕâ²¢·ÇJSµÄ´í£¬¶øȷʵÊÇStringÊý¾ÝÁ¿Ì«¶à£©
2£©ÓÃÆ´ºÏ×Ö·û´®µÄ·½·¨¿ÉÒÔʹЧÂÊÌá¸ß£¬ÔÚ×Ö·û´®½Ï´óʱ£¬2£©µÄÇé¿öÈÔÈ»³öÏÖ¡£³¬¹ýÒ»¶¨µÄÊýÁ¿£¬ËٶȻáÃ÷ÏÔÂýÏÂÀ´¡£
3£©ÕýÔòÆ¥ÅäµÄ·½·¨»á±Èƽ³£±éÀúµÄ·½·¨Òª¸ßЧһЩ¡£
4£©ÔÚÖ´Ðйý³ÌÖУ¬°ó¶¨Ê¼þµÄʱ¼ä»á»¨·Ñ¸ü¶àһЩ¡£²âÊÔÔÚ1wÌõÊý¾ÝÇé¿öÏ£¬´óÔ¼ÊÇÆ¥ÅäÒÔ¼°Éú³ÉHTMLÊý¾ÝµÄ30±¶£¬Ò²¾ÍÊÇ˵Éú³ÉÊý¾Ý×Ü»¨·Ñ100ms£¬¶ø°ó¶¨Ê¼þÔòÐèÒª3000ms¡£
5£©×ÜÌåÀ´Ëµ¡£IEµÄËÙ¶ÈÒª±ÈMozillaÒªÂý£¨ÎÒÓõÄÊÇFirefox1.5×öµÄ²âÊÔ£©¡£
6£©´óÊý¾ÝÁ¿Ê±£¬²»ÒªÓÃDOMÉú³ÉElement¡£
7£©·ÇJSÄÚÖ÷½·¨£¬Ò²Ðí»áÒý·¢ºÜ¶àʱ¼ä¹ý¶àÖظ´µÄÀͶ¯¶øÇÒ¿ÉÄÜʵÃÆä·´¡£½¨Ò龡¿ÉÄÜÀû»áÄÚÖ÷½·¨¡£
×ܽáÎÊÌ⣺
Ò»¡¢ÔÚ°Ñ×Ö·û´®¸øµ½innerHTMLÉÏ¡£
¶þ¡¢Ñ­»·°ó¶¨Ê¼þËù»¨·Ñʱ¼ä¡£
Èý¡¢Éú³ÉÎÒÃÇÐèÒªµÄDIVËù»¨Ê±¼ä¡£
ËÄ¡¢²»Í¬µÄä¯ÀÀÆ÷ÎÊÌâ¡£
ÏÂÃæ¶ÔÖ¢ÏÂÒ©£º
ÎÊÌâÒ»
ÎÒÃÇ¿ÉÒÔ×öµÄûÓÐÆäËüµÄ£¬Ö»Óо¡¿ÉÄÜÉÙµÄHTML×Ö·û´®£¬±ÈÈç×î»ù±¾µÄÒ»¸öDIV£¬¿ÉÒÔÕâÑùд
<div style="height:20px; font:9pt Verdana;"></div>Ò²¿ÉÒÔÕâÑùд<div class="c1"></div>£¬µÚ¶þÖ־ͱȵÚÒ»ÖÖËÙ¶ÈÃ÷ÏÔÒª¿ìµÄ¡£Èç¹û»¹²»ÐеĻ°£¬Çë¿´ÏÂÃæÕâ¸ö·½·¨¶ÔÄãÊÇ·ñºÏÊÊ
ÔÚ×ö³ÌÐòµÄʱºòͻȻÏëÆðÀ´51jsÉÏPK tree£¬Ò»Î»°æÖ÷ËùдµÄÒ»¿ÃÊ÷£¬1°ÙÍòµÄÒ»¸ö½Úµã£¬¶¯Ì¬ÔØÈë¡£Ö»ÐèÒª²»µ½1Ãë¡£ºÁÎÞÒÉÎÊ£¬¿Ï¶¨ÊÇÈ¡ÇÉÁË£¬ÒòΪֻҪֻÉútreeµÄhtml¾ÍÊÇÒ»¸öºÜ´óµÄÊýÁ¿¡£Õâ¸öÊ÷µÄÌرðµÄµØ·½¾ÍÊÇÉú³ÉÊ÷ʱ£¬²¢·Ç°Ñ1°ÙÍòµÄ½Úµã¶¼Ò»´ÎÉú³ÉinnerHTML£¬¶øÊÇÖ»Éú³ÉÔÚÊӽǷ¶Î§ÄڵĽڵ㣬µ±¹ö¶¯ÌõÏòϹöµÄʱºò£¬²Å¶¯Ì¬µÄÔÙÉú³ÉÊ÷½Úµã¡£Õâ¸ö·½·¨ÖÁÉÙÎÒ¾õµÃ˼ÏëºÜ¿ªÀ«£¬ºÜÓмÛÖµ¡£
ÎÒÃÇËùÖªµÀ£¬mySQLÊý¾Ý¿âÀïÈ¡Êý¾Ý¿ÉÒÔÕâôȡ¡£SELECT * from table limit 0,100£¬Òâ˼ÊÇֻȡÊý¾Ý¿âÖеÄ0-100ÌõÊý¾Ý¡£Ëµµ½ÕâÀï¿ÉÄÜÓÐЩÅóÓÑÒ²Ïëµ½ÁË£¬ÔÚJSÖУ¬ÎÒÃÇ¿ÉÒÔÀûÓÃÕâ¸ö·½·¨À´È¡Êý¾Ý£¬½«Ò»¸öÊý×é¿´×÷ÊÇÒ»¸ö±í¡£Ö»Êǵ¥´¿µÄÊý¾Ý±í£¬·Ç¶þά


Ïà¹ØÎĵµ£º

Javascript ģ̬´°¿Ú

<html>
<head>
    <script language="javascript">
        function overlay() {
            xyz = document.getElementById("overlay");
   &n ......

JavaScript»ñÈ¡DOM½ÚµãÔªËØ

JavaScript»ñÈ¡DOM½ÚµãÔªËØ
ÔÚWebÓ¦ÓóÌÐòÌرðÊÇWeb2.0³ÌÐò¿ª·¢ÖУ¬¾­³£Òª»ñÈ¡Ò³ÃæÖÐij¸öÔªËØ£¬È»ºó¸üиÃÔªËصÄÑùʽ¡¢ÄÚÈݵȡ£ÈçºÎ»ñÈ¡Òª¸üеÄÔªËØ£¬ÊÇÊ×ÏÈÒª½â¾öµÄÎÊÌâ¡£ÁîÈËÐÀοµÄÊÇ£¬Ê¹ÓÃJavaScript»ñÈ¡½ÚµãµÄ·½·¨ÓкܶàÖÖ£¬ÕâÀï¼òµ¥×öÒ»ÏÂ×ܽ᣺
ͨ¹ý¶¥²ãdocument½Úµã»ñÈ¡£º
   1. document.getElement ......

ActiveX×é¼þÓëJavaScript½»»¥

1£®ÔÚCOM×é¼þÖе÷ÓÃJavaScriptº¯Êý
// Á¬½Óµã·½Ê½Ò³Ãæjavascript½Å±¾
<object classid="CLSID:B568F111-DFE4-4944-B67F-0728AB2AB30F"
id="testCom" VIEWASTEXT></object>
<script language="JavaScript" for="testCom" event="staTe(s)">
&nbs ......

JavaScript±Ê¼Ç

ä¯ÀÀÆ÷ÒѾ­¿´µ½µÄ¶«Î÷¶¼´æÔÚ»º´æÎļþ¼ÐÀï¡£
½Å±¾×¢ÊÍ: µ¥ÐÐ// ¶àÐÐ/*....*/
Æô¶¯Ê±ºò¼ÓÔØfunction()      window.onload= function;
alert Ìáʾ¶Ô»°¿ò alert("ÌáʾÄÚÈÝ");
promptÌáʾÊäÈë¿òprompt("ÌáʾÄÚÈÝ","ĬÈÏÖµ")£»
   
JavaScriptÖض¨Ïò ÔÚ×°ÔØÒ³Ãæʱ£¬²»ÄÜÔÚ×°ÔØÍêÖ ......

javascriptµ¯³ö´°¿Ú´úÂë

ÖÆ×÷Javascriptµ¯³ö´°¿Ú¼¼ÇɾÅÔò
1¡¢×î»ù±¾µÄµ¯³ö´°¿Ú´úÂë
¡¡¡¡Æäʵ´úÂë·Ç³£¼òµ¥£º
¡¡¡¡< SCRIPT LANGUAGE="javascript">
¡¡¡¡< !--
¡¡¡¡window.open ("page.html")
¡¡¡¡--
>
¡¡¡¡< /SCRIPT>
¡¡¡¡ÒòΪÕâÊÇÒ»¶ÎJavascript´úÂ룬ËùÒÔËüÃÇÓ¦¸Ã·ÅÔÚ< SCRIPT LANGUAGE="javascript">Ö®¼ä¡£ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ