JavaScriptÖÐ×ÓÀàµ÷Óø¸Àà·½·¨
ºÜ¾Ã֮ǰ¾ÍÔÚÓÃJavaScriptÁË£¬Ö»ÊÇÓõıȽϱí²ã£¬»áд¼¸¸öº¯Êý¶øÒÑ£¬Ò²Ã»ÓÐÉîÈëµÄÑо¿¹ý¡£×î½üÒ»¶Îʱ¼ä£¬ÓÉÓÚÏîÄ¿µÄÐèÒª£¬¿´ÁËһЩ¹ØÓÚJavaScriptµÄÊ飬ҲдÁ˲»ÉÙµÄJavaScriptµÄ´úÂ룬ÂýÂý¿ªÊ¼¶ÔÕâ¸ö¶«¶«×ÅÃÔÁË¡£ÏÖÔÚJavaScriptÔÚWebÓ¦ÓÃÖеıÈÖØÔ½À´Ô½´ó£¬¸÷ÖÖºÃÓõĿâÒ²²ã³ö²»Ç¼´Ê¹¶ÔJavaScriptÁ˽âµÄ±È½ÏdzÏÔ£¬Ò²¿ÉÒÔÀûÓø÷ÖÖÀûÆ÷×ö³öºÜ²»´íµÄ×÷Æ·¡£µ«ÊÇ£¬½ÏΪÉîÈëµÄÁ˽âÒ»ÏÂJavaScriptµÄÌØÐÔ£¬¶ÔÓÚ¸üÊìÁ·µÄʹÓÃËü¿Ï¶¨»¹ÊÇÓкܴóµÄ°ïÖúµÄ¡£
JavaScriptÊÇÒ»ÖÖ»ùÓÚÔÐÍ£¨prototype-based£©µÄÓïÑÔ£¬¶øJavaÊÇ»ùÓÚÀࣨclass-based£©µÄÓïÑÔ¡£¶ÔÓÚÎÒÕâÖÖÏÈѧϰJavaÔÙѧϰJavaScriptµÄÈËÀ´Ëµ£¬×ÜÊǻ᲻×Ô¾õµÄÓÃһЩJavaµÄ¸ÅÄîÈ¥ÍùJavaScriptÉÏÌ×ÓᣱÈÈç˵£¬ÎҾͺÜÏëÔÚJavaScriptÖÐʹÓÃÀàËÆJavaÖÐsuper.someMethod()¡£µ«ÊǺܶàJavaScriptµÄ×ÊÁÏÉÏ×î³£¼ûµÄд·¨ÊÇ£º
someObject.prototype.someMethod = function(){…};
ÕâÑù¾ÍÊÇÍêÈ«¸ÄдÁ˸¸ÀàµÄ·½·¨£¬ÊÇÎÞ·¨Âú×ãÐèÇóµÄ¡£
½èÖúJavaScriptÖеÄapply»òÕßcall£¬¾Í¿ÉÒÔʵÏÖÔÚ×ÓÀàÖе÷Óø¸Àà·½·¨¡£
¼ÙÉèÈçϳ¡¾°£º¸ù¾Ý²»Í¬µÄÊý¾Ý¶ÔÉú³ÉµÄͼÐνøÐв»Í¬ÐÎʽµÄÌî³ä¡£¸¸ÀฺÔðÉú³É»ù±¾µÄͼÐΣ¬×ÓÀà¸ù¾ÝÐèÇó¶Ô¸¸ÀàÉú³ÉµÄͼÏñ½øÐÐÌî³ä¡£
´úÂëÈçÏ£º
<html>
<head>
<meta content="text/html; charset=UTF-8"/>
<mce:script type="text/javascript"><!--
Shape = function() {
this.id = null;
this.picture = null;
this.draw = function(canvas){
this.picture = "Óɸ¸Àà²úÉúµÄͼÏñÒѾÉú³ÉÔÚ»²¼ÉÏÁË";
};
};
CommonShape = function(){};
CommonShape.prototype = new Shape();
CrossFillShape = function(){
this.draw = function(canvas){
CrossFillShape.prototype.draw.apply(this, arguments);
this.picture = this.picture + ", È»ºó±»×ÓÀà CrossFillShape Ìî³ä";
};
};
CrossFillShape.prototype = new Shape();
SolidFillShape = function(){
this.draw = function(canvas){
SolidFillShape.prototype.draw.apply(this, arguments);
this.picture = this.picture + ", È»ºó±»×ÓÀà SolidFillShape Ìî³ä";
};
};
SolidFillShape.prototype = new Shape();
function test1() {
var s = new CommonShape();
s.draw();
console.debug(s.picture);
var cs = new CrossFillSh
Ïà¹ØÎĵµ£º
±¾ÎÄÖ÷ÒªÊdzöÓÚÓÐÅóÓÑʹÓÃÎÒÔÀ´Ð´µÄautocompleteµÄJS¿Ø¼þ¡£µ±Êý¾ÝÁ¿´óµÄʱºò£¬»á³öÏÖЧÂʼ«ÆäÂýµÄÇé¿ö£¬ÎÒÔÚÕâ¶Îʱ¼ä×ö³öµÄһЩ²âÊÔÒ²¼°Ò»Ð©¾Ñ飬Óë´ó¼Ò·ÖÏí£¬Èç¹ûÓдíµÄµØ·½£¬»¹ÇëÖ¸³ö¡£
¾¹ý²âÊÔ£¬ÎÒÃǻᷢÏÖÈçϵÄÇé¿ö»òÕß˵µÄ½áÂÛ£¬Èç¹ûÄúµÄ²âÊÔ½á¹ûÓëÎҵIJ»·û£¬Çë˵Ã÷ÔÒò£¬ÒÔ±ãÏ໥ѧϰ¡£
1£©µ±Ò»¸ö½Ï´óµÄHTML×Ö· ......
Òý×Ó
±à³ÌÊÀ½çÀïÖ»´æÔÚÁ½ÖÖ»ù±¾ÔªËØ£¬Ò»¸öÊÇÊý¾Ý£¬Ò»¸öÊÇ´úÂë¡£±à³ÌÊÀ½ç¾ÍÊÇÔÚÊý¾ÝºÍ´úÂëǧ˿ÍòÂƵľÀ²øÖгÊÏÖ³öÎÞÏÞµÄÉú»úºÍ»îÁ¦¡£
Êý¾ÝÌìÉú¾ÍÊÇÎľ²µÄ£¬×ÜÏë±£³Ö×Ô¼º¹ÌÓеı¾É«£»¶ø´úÂëÈ´ÌìÉú»îÆã¬×ÜÏë¸Ä±äÕâ¸öÊÀ½ç¡£
Äã¿´£¬Êý¾Ý´úÂë¼äµÄ¹ØϵÓëÎï ......
from http://news.csdn.net/a/20100424/218105.html
JavaScript µÄ³É¹¦ÈÃÈ˽ò½òÀÖµÀ£¬Îª Web ÍøÒ³±àд JavaScript ´úÂëÒѾÊÇËùÓÐ Web Éè¼ÆʦµÄ»ù±¾¹¦£¬ÕâÃÅÓÐȤµÄÓïÑÔÔ̲Ø×ÅÐí¶à²»ÎªÈËÊìÖªµÄ¶«Î÷£¬¼´Ê¹¶àÄêµÄ JavaScript ³ÌÐòÔ±£¬Ò²Î´ÄÜÍêÈ«³Ô͸¡£±¾ÎÄ´Ó7¸ö·½Ãæ½²Êö JavaScript ÖÐÄÇЩÄã²»ºÜÊìÖªµ«·Ç³£ÊµÓõļ¼ÇÉ¡£
......
var arr=['a','b','c'];
¡¡¡¡ÈôҪɾ³ýÆäÖеÄ'b',ÓÐÁ½ÖÖ·½·¨£º
¡¡¡¡1.delete·½·¨:delete arr[1]
¡¡¡¡ÕâÖÖ·½Ê½Êý×鳤¶È²»±ä,´Ëʱarr[1]±äΪundefinedÁË,µ«ÊÇÒ²Óкô¦ÔÀ´Êý×éµÄË÷ÒýÒ²±£³Ö²»±ä,´ËʱҪ±éÀúÊý×éÔªËØ¿ÉÒÔ²ÅÓÃ
¡¡¡¡for(index in arr)& ......
///ÏÂÃæÊǶÔAccessµÄÁ´½Ó
function getCountfromDB() {
//ÒÔµ±Ç°Ò³ÃæÎļþΪ»ù´¡£¬ÕÒµ½ÎļþËùÔڵľø¶Ô·¾¶¡£
var filePath = location.href.substring(0, location.href.indexOf("Cnt.htm"));
var path = filePath + "MyData.mdb";
//È¥µ ......