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

JavaScriptµÄä¯ÀÀÆ÷¶ÔÏóÏê½â

JavaScriptµÄä¯ÀÀÆ÷¶ÔÏóÏê½â  
Ò»¡¢ä¯ÀÀÆ÷¶ÔÏó²ã´Î¼°ÆäÖ÷Òª×÷ÓÃ
¶þ¡¢Îĵµ¶ÔÏó¹¦Äܼ°Æä×÷Óà
Èý¡¢·¶Àý 
ʹÓÃä¯ÀÀÆ÷µÄÄÚ²¿¶ÔÏóϵͳ, ¿ÉʵÏÖÓëHTMLÎĵµ½øÐн»»¥¡£ËüµÄ×÷ÓÃÊǽ«Ïà¹ØÔªËØ×éÖ¯°ü×°ÆðÀ´£¬Ìṩ¸ø³ÌÐòÉè¼ÆÈËԱʹÓ㬴Ӷø¼õÇá±à³ÌÈ˵ÄÀͶ¯£¬Ìá¸ßÉè¼ÆWebÒ³ÃæµÄÄÜÁ¦¡£
Ò»¡¢ä¯ÀÀÆ÷¶ÔÏó²ã´Î¼°ÆäÖ÷Òª×÷Óà                               
³ýÁËÇ°ÃæÌáµ½¹ýµÄÎĵµdocument¶ÔÏóÍ⣬Navigatorä¯ÀÀÆ÷Öл¹ÌṩÁË´°¿Ú£¨Window£©¶ÔÏóÒÔ¼°ÀúÊ·£¨History£©ºÍλÖã¨Location£©¶ÔÏó¡£
¡ñä¯ÀÀÆ÷¶ÔÏó(Navigator)ÌṩÓйØä¯ÀÀÆ÷µÄÐÅÏ¢
navigatorÖÐÓÐÓõÄÊôÐÔ°üÀ¨£º
¡ùappName:Ìṩ×Ö·û´®ÐÎʽµÄä¯ÀÀÆ÷Ãû³Æ¡£
¡ùappVersion:·´Ó³ä¯ÀÀÆ÷µÄ°æ±¾ºÅ¡£
¡ùappCodeName:ä¯ÀÀÆ÷µÄ´úÂëÃû³Æ¡£
¡ùuserAgent:Óû§´úÀí±êʶ¡£
¡ùmineTypes:¿ÉÒÔʹÓõÄmineÀàÐÍÐÅÏ¢¡£
¡ùplugins:¿ÉÒÔʹÓõIJå¼þÐÅÏ¢¡£
¡ùlanguages:ÓïÑÔÉ趨¡£
¡ùplatform:ä¯ÀÀÆ÷ÊÊÓõÄƽ̨Ãû³Æ¡£
ʾÀý£ºÄãËùʹÓõÄä¯ÀÀÆ÷Ϊ£ºMicrosoft Internet Explorer°æ±¾Îª£º4.0 (compatible; MSIE 6.0; Windows 98)
<script>
document.write("ÄãËùʹÓõÄä¯ÀÀÆ÷Ϊ£º"+navigator.appName);
document.write("°æ±¾Îª£º"+navigator.appVersion);
</script>
¡ñ´°¿Ú¶ÔÏó(Windows) 
Window¶ÔÏóÓÐÒÔÏ·½·¨£º
¡ùopen(url,WindowName,parameterlist):´´½¨Ò»¸öд°¿Ú¡£
¡ùclose():¹Ø±ÕÒ»¸ö´°¿Ú¡£
¡ùalert(text):¾¯¸æ´°¿Ú¡£
¡ùconfirm(text):µ¯³öÈ·ÈÏÓò¡£
¡ùpromt(text,Defaulttext):µ¯³öÌáʾ¿ò¡£
¡ùsetTimeout(±í´ïʽ£¬Ê±¼ä)¶¨Ê±ÉèÖá£
¡ùclearTimeout(timer)£ºÈ¡ÏûÒÔÇ°µÄÉ趨¡£
¡ùsetInterval(±í´ïʽ£¬Ê±¼ä):É趨һ¸öʱ¼ä¼ä¸ô¡£
¡ùclearInterval(timer):È¡Ïûʱ¼ä¼ä¸ôÉ趨¡£
¡ùmoveBy(ˮƽλÒÆ£¬´¹Ö±Î»ÒÆ):½«´°¿ÚÒÆÖ§Ö¸¶¨µÄλÒÆ¡£
¡ùmoveTo(x,y):½«´°¿ÚÒƶ¯µ½Ö¸¶¨µÄ×ø±ê¡£
¡ùresizeBy(ˮƽλÒÆ£¬´¹Ö±Î»ÒÆ):°´¸ø¶¨µÄλÒÆÁ¿ÖØÐÂÉ趨´°¿Ú´óС¡£
¡ùresizeTo(x,y):½«´°¿ÚÉ趨Ϊָ¶¨´óС¡£
¡ùscrollBy(ˮƽλÒÆ£¬´¹Ö±Î»ÒÆ):°´¸ø¶¨µÄλÒÆÁ¿¹ö¶¯´°¿Ú¡£
¡ùscrollTo(x,y):½«´°¿Ú¹ö¶¯µ½Ö¸¶¨Î»Öá£
¡ùfind(["string",true|false][,true|false]):²éÕÒÍøÒ³ÖеÄ×Ö·û´®¡£
¡ùback():ºóÍË¡£
¡ùforward():Ç°½ø¡


Ïà¹ØÎĵµ£º

[·­Òë]High Performance JavaScript(029)

Working Around Caching Issues  ¹ØÓÚ»º´æÎÊÌâ
    Adequate cache control can really enhance the user experience, but it has a downside: when revving up your application, you want to make sure your users get the latest version of the static content. This is accomplished by renaming ......

[·­Òë]High Performance JavaScript(030)

µÚʮՠ Tools  ¹¤¾ß
    Having the right software is essential for identifying bottlenecks in both the loading and running of scripts. A number of browser vendors and large-scale websites have shared techniques and tools to help make the Web faster and more efficient. This ......

[·­Òë]High Performance JavaScript(031)

Firebug
    Firefox is a popular browser with developers, partially due to the Firebug addon (available at http://www.getfirebug.com/), which was developed initially by Joe Hewitt and is now maintained by the Mozilla Foundation. This tool has increased the productivity of web develop ......

javascript trim·½·¨

ÔÚjavascriptÖеÄstring¶ÔÏóûÓÐtrim·½·¨£¬ËùÒÔtrim¹¦ÄÜÐèÒª×Ô¼ºÊµÏÖ£º
´úÂëÈçÏ£º
Java´úÂë
﹤scriptlanguage=”javascript”﹥   
/**  
*ɾ³ý×óÓÒÁ½¶ËµÄ¿Õ¸ñ  
*/  
String.prototype.trim=function(){      
  &nbs ......

107ÌõJavascriptµÄ³£ÓÃÓï¾ä


1. document.write( " "); Êä³öÓï¾ä
2.JSÖеÄ×¢ÊÍΪ//
3.´«Í³µÄHTMLÎĵµË³ÐòÊÇ:document- >html- >(head,body)
4.Ò»¸öä¯ÀÀÆ÷´°¿ÚÖеÄDOM˳ÐòÊÇ:window- >(navigator,screen,history,location,document)
5.µÃµ½±íµ¥ÖÐÔªËصÄÃû³ÆºÍÖµ:document.getElementById( "±íµ¥ÖÐÔªËصÄID號 ").name(»òvalue)
6.Ò ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ