[JavaScript]ÀàÖ®Ò»
Ò»¸ö¼òµ¥µÄjavascriptÀඨÒåÀý×Ó
º¸ÇÁËjavascript¹«ÓгÉÔ±¶¨Ò塢˽ÓгÉÔ±¶¨Òå¡¢ÌØȨ·½·¨¶¨ÒåµÄ¼òµ¥Ê¾Àý
Java´úÂë
<script>
//¶¨ÒåÒ»¸öjavascriptÀà
function JsClass(privateParam/* */,publicParam){//¹¹Ô캯Êý
var priMember = privateParam; //˽ÓбäÁ¿
this.pubMember = publicParam; //¹«¹²±äÁ¿
//¶¨Òå˽Óз½·¨
function priMethod(){
return "priMethod()";
}
//¶¨ÒåÌØȨ·½·¨
//ÌØȨ·½·¨¿ÉÒÔ·ÃÎÊËùÓгÉÔ±
this.privilegedMethod = function(){
var str = "ÕâÊÇÌØȨ·½·¨£¬ÎÒµ÷ÓÃÁË\n";
str += " ˽ÓбäÁ¿£º" + priMember +"\n";
str += " ˽Óз½·¨£º" + priMethod() +"\n";
str += " ¹«¹²±äÁ¿£º" + this.pubMember +"\n";
&nb
Ïà¹ØÎĵµ£º
Ò»¡¢ÔÚHTMLÖÐǶÈëJavasriptµÄ·½·¨
Ö±½ÓÔÚJavascript´úÂë·ÅÔÚ±ê¼Ç¶Ô<script>ºÍ</script>Ö®¼ä
ÓÉ<script />±ê¼ÇµÄsrcÊôÐÔÖƶ¨ÍⲿµÄjsÎļþ
·ÅÔÚʼþ´¦Àí³ÌÐòÖУ¬±ÈÈ磺<p onclick="alert('ÎÒÊÇÓÉonclickʼþÖ´ÐеÄJavascript')">µã»÷ÎÒ</p>
×÷ΪURLµÄÖ÷Ì壬Õâ¸öURLʹÓÃÌØÊâµÄJavascript ......
½ñÌì¿´jQueryµÄʱºò·¢ÏÖµÄÊéдÐÎʽÔÀ´Ã»Óмû¹ý ÈçÏ£º
(function(){
statement
...
})();
²»Àí½â£¬ºóÀ´ÉÏÍø²éÁËһϣ¬ÔÀ´ÊÇjavascriptÄäÃûº¯ÊýµÄµ÷Ó÷½Ê½
http://zhidao.baidu.com/question/95789340.html
javascript ¿ÉÒÔÒÔÏ·½Ê½µ÷Óú¯Êý
ÉùÃ÷
a = function(){};
µ÷ÓÃ
a();
¿ÉÒÔÀí½âΪ
(function(){ ......
ÕâÈý¸öÓïÑÔ·Ö±ðÊÇÈý¸ö¹«Ë¾¿ª·¢µÄ£¬SUNµÄJava£¬NetscapeµÄJavaScript£¬MicrosoftµÄJScript
JavaScriptÊÇÓÉNetscape¹«Ë¾¿ª·¢²¢ËæNavigatorµ¼º½ÕßÒ»Æð·¢²¼µÄ¡¢½éÓÚJavaÓëHTMLÖ®¼ä¡¢»ùÓÚ¶ÔÏóʼþÇý¶¯µÄ±à³ÌÓïÑÔ£¬²»ÐèÒªJava±àÒëÆ÷£¬¶øÊÇÖ±½ÓÔËÐÐÔÚWebä¯ÀÀÆ÷ÖУ¬ËüµÄÇ°ÉíÊÇLive Script¡£
JScriptÊÇÒ»ÖÖÀàËÆJavaScriptµÄÓïÑÔ¡ ......
ʵÀýЧ¹û
Ô¤ÀÀЧ¹û1£º
ÕâÊÇÒ»¸öÑÕÉ«Ìݶȱ仯ÑÝʾ£º
Ô¤ÀÀЧ¹û2£º
Ò»¸öÑÕÉ«½¥±äµÄ²Ëµ¥£º
Cropper
Tween
Slider
Resize
Drag
Ô¤ÀÀЧ¹û3£º
ÑÕÉ«½¥±äµÄÓÐȤӦÓ㬵ã»÷Ëæ»úÑÕÉ«½¥±ä£º
µã»÷Ëæ»ú»»ÑÕÉ«
³ÌÐò˵Ã÷
¡¾ColorGradsÑÕÉ«Ìݶȡ¿
³ÌÐòColorGradsµÄ×÷ÓÃÊÇͨ¹ýStartColorºÍEndColorÉú³ÉÑÕÉ«Ìݶȼ¯ºÏ¡£
ÑÕÉ«¶¼¿ ......
±ê×¼µÄWeb ×é³ÉÓ¦¸Ã°üÀ¨3 ²¿·Ö£º½á¹¹¡¢ÐÐΪºÍ±íÏÖ¡£ÕâÖÖ˼Ïë×îÔçÔÚ΢ÈíÉè¼ÆµÄ
DHTMLÄ£ÐÍÖгõ²½Ìá³öÀ´£¬µ«ÊǺܲ»¹æ·¶£¬Ò²²»³Éϵͳ¡£ºóÀ´£¬W3C£¨World Wide Web
Consortium£¬ÍòάÍøÁªÃË£©×éÖ¯¹æ·¶ÁËWeb µÄ¹¹³É¡£¸ù¾ÝW3C Öƶ©µÄ±ê×¼£¬Web ±ê×¼²»
ÊÇijһ¸ö±ê×¼£¬¶øÊÇһϵÁбê×¼µÄ¼¯ºÏ¡£ÍêÕûµÄWeb Ó¦¸ÃÓÉÒÔÏÂ3 ²¿·Ö×é³É£º
½á ......