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

javascript¼¼ÇÉ×Öµä

ÿһÏÊÇjsÖеÄС¼¼ÇÉ£¬µ«Ê®·ÖµÄʵÓã¡
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.Ò»¸öСдת´óдµÄJS: document.getElementById("output").value = document.getElementById("input").value.toUpperCase();
7.JSÖеÄÖµÀàÐÍ:String,Number,Boolean,Null,Object,Function
8.JSÖеÄ×Ö·ûÐÍת»»³ÉÊýÖµÐÍ:parseInt(),parseFloat()
9.JSÖеÄÊý×Öת»»³É×Ö·ûÐÍ:(""+±äÁ¿)
10.JSÖеÄÈ¡×Ö·û´®³¤¶ÈÊÇ:(length)
11.JSÖеÄ×Ö·ûÓë×Ö·ûÏàÁ¬½ÓʹÓÃ+ºÅ.
12.JSÖеıȽϲÙ×÷·ûÓÐ:==µÈÓÚ,!=²»µÈÓÚ,>,>=,<.<=
13.JSÖÐÉùÃ÷±äÁ¿Ê¹ÓÃ:varÀ´½øÐÐÉùÃ÷
14.JSÖеÄÅжÏÓï¾ä½á¹¹:if(condition){}else{}
15.JSÖеÄÑ­»·½á¹¹:for([initial expression];[condition];[upadte expression]) {inside loop}
16.Ñ­»·ÖÐÖ¹µÄÃüÁîÊÇ:break
17.JSÖеĺ¯Êý¶¨Òå:function functionName([parameter],...){statement[s]}
18.µ±ÎļþÖгöÏÖ¶à¸öform±íµ¥Ê±.¿ÉÒÔÓÃdocument.forms[0],document.forms[1]À´´úÌæ.
19.´°¿Ú:´ò¿ª´°¿Úwindow.open(), ¹Ø±ÕÒ»¸ö´°¿Ú:window.close(), ´°¿Ú±¾Éí:self
20.״̬À¸µÄÉèÖÃ:window.status="×Ö·û";
21.µ¯³öÌáʾÐÅÏ¢:window.alert("×Ö·û");
22.µ¯³öÈ·ÈÏ¿ò:window.confirm();
23.µ¯³öÊäÈëÌáʾ¿ò:window.prompt();
24.Ö¸¶¨µ±Ç°ÏÔʾÁ´½ÓµÄλÖÃ:window.location.href="URL"
25.È¡³ö´°ÌåÖеÄËùÓÐ±íµ¥µÄÊýÁ¿:document.forms.length
26.¹Ø±ÕÎĵµµÄÊä³öÁ÷:document.close();
27.×Ö·û´®×·¼ÓÁ¬½Ó·û:+=
28.´´½¨Ò»¸öÎĵµÔªËØ:document.createElement(),document.createTextNode()
29.µÃµ½ÔªËصķ½·¨:document.getElementById()
30.ÉèÖÃ±íµ¥ÖÐËùÓÐÎı¾Ð͵ijÉÔ±µÄֵΪ¿Õ:
var form = window.document.forms[0]
for (var i = 0; i<form.elements.length;i++){
     if (form.elements.type == "text"){
         form.elements.value = "";
     }
}
31.¸´Ñ¡°´Å¥ÔÚJSÖÐÅжÏÊÇ·ñÑ¡ÖÐ:document.forms[0].checkThis.checked (checkedÊôÐÔ´ú±íΪÊÇ·ñÑ¡Öзµ»ØTRUE»òFALSE)
32.µ¥Ñ¡°´Å¥×é(µ¥Ñ¡°´Å¥µÄÃû³Æ±ØÐëÏàͬ):È¡µ¥Ñ¡


Ïà¹ØÎĵµ£º

JavaScript ´´½¨Êý×éµÄ·½·¨ºÍ»ù±¾²Ù×÷

Êý×éÊÇÎÒ´Óѧϰ±à³ÌÒÔÀ´´ò½»µÀ×î¶àµÄÒ»ÖÖÊý¾ÝÀàÐÍ£¬Æäʵ˵°×ÁË£¬Êý×éÎ޷ǾÍÊÇkey value¶Ô¡£»¹¼ÇµÃ¸Õ²Î¼Ó¹¤×÷Äǻᣬһ¸öphpµÄforeachÑ­»·¾Í²îµã¸ãµÃÎÒÍÂѪ£¬ÏÖÔÚ»ØÍ·ÏëÏ룬µ±Ê±×Ô¼ºÕæ¹»±¿µÄ¡£
Êý×é(array)ÊÇÒ»ÖÖÊý¾ÝÀàÐÍ£¬Ëü°üº¬»òÕß´æ´¢Á˱àÂëµÄÖµ£¬Ã¿¸ö±àÂëµÄÖµ³Æ×÷¸ÃÊý×éµÄÒ»¸öÔªËØ(element),ÿ¸öÔªËصıàÂë±»³Æ×÷Ï ......

10ÖÖJavaScriptÌØЧʵÀýÈÃÄãµÄÍøÕ¾¸üÎüÒýÈË

½ñÌìµÄ»°ÌâÊÇÈçºÎ¸Ä½ø×Ô¼ºÍøÕ¾µÄ½çÃæ»òÌá¸ßÍøÕ¾µÄÊÓ¾õÌåÑ飬´Ó¶øÈÃÓû§¼ÇÒäÓÌС£
¡¡¡¡ÎÒÃÇÓÐÈýÖÖÖ÷ÒªµÄ·½·¨(´ÓÄѵ½Ò×):×Ô¼º¶¯ÊÖд½Å±¾;ʹÓÃÀàËÆÓÚjQueryºÍmooToolsµÄJavaScript¿ò¼Ü(¿ÉÒÔÈñàд´úÂë±ä
µÃ¸üÈÝÒ×Щ);ʹÓÃÄܹ¤×÷ÓÚÏÖÓеÄJavaScript¿ò¼ÜϵÄÌáÇ°Ô¤ÖúõĽű¾»òÄÇÖÖ´ÓÍ·¿ªÊ¼¿ª·¢µÄ´´½¨Õß¡£ÕâƪÎÄÕÂÊʺÏÄÇЩ´òË ......

12¸öÓÅÐãµÄjavascript(ajax)µ¯³ö²ã

Thickbox

-
»ùÓÚ
jQuery
£¬Ö§³Ö AJAX£¬ÇáÁ¿¼¶µÄ¶øÇұȽϸßЧ¡£Ö§³ÖͼƬÓëHTMLÄÚÈÝ¡£´óСԼΪ
40k£¬Ä¿Ç°»¹¿É×÷Ϊ WordPress
µÄ²å¼þʹÓá£Õâ¸öjsµÄÓŵãÔÚÓÚÓ룬¸¸¼¶µÄÔ­Ò³Ãæ¹ö¶¯ÌõËæÊó±ê¹ö¶¯µÄʱºò£¬µ¯³öµÄ²ã²¢²»Òƶ¯£¬¶øʼÖÕ´¦ÓÚä¯ÀÀÆ÷µÄ¹Ì¶¨Î»Öá£
 
GreyBox

- ´´½¨ iframe µÄµ¯³ö½çÃ棬¿ÉʹÓÃͼƬ ......

JavascriptµÄhistory¶ÔÏó

history¶ÔÏó3¸ö·½·¨back()¡¢forward()ºÍgo()£¬ÕâЩ·½·¨¿ÉÒÔµ÷ÓÃÀúÊ·±íÖаüº¬µÄÎĵµ¡£
back()·½·¨×°ÈëÀúÊ·±íÖеÄÇ°Ò»¸öÒ³Ã棬µÈЧÓÚä¯ÀÀÆ÷ÖеÄBack°´Å¥
forward()·½·¨×°ÈëÀúÊ·±íÖеĺóÒ»¸öÒ³Ã棬µÈЧÓÚä¯ÀÀÆ÷ÖеÄForward°´Å¥
go()·½·¨½øÈëÀúÊ·±íÖеÄÌض¨Îĵµ£¬¿ÉÒÔÈ¡ÕûÐβÎÊý»ò×Ö·û´®²ÎÊý
go(n)n>0ʱ£¬×°ÈëÀúÊ·±íÖÐµÄ ......

¡¶Îò͸javascript¡·Ñ§Ï°±Ê¼Ç£ºÆß¡¢¶ÔÏóÃèÊö

ÒýÑÔ
 
      ÔÚJavaScriptÖÐÎÒÃÇʹÓÃÁËÒ»ÖÖ±»³ÆΪ JavaScript Object Notation(ËõдJSON)µÄÐÎʽ£¬·­ÒëΪÖÐÎľÍÊÇ“JavaScript¶ÔÏó±íʾ·¨”¡£Ëü¿ÉÒÔ¼ò½éÇåÎúµØ½«¶ÔÏóµÄ½á¹¹ÃèÊö³öÀ´£¬´Ó¶ø´ó´ó½µµÍÁËÎÒÃǵŤ×÷Á¿²¢¼õÉÙÁËÊý¾ÝÁ¿¡£
 
JsonʾÀý
 
<script languag ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ