JavaScriptº¯Êý¶¨ÒåÓï·¨×ܽá
JavaScript
º¯Êý¶¨ÒåÓï·¨×ܽá
×÷Õß
»Æ³Ï
QQ
Ⱥ£º
65643887
1
£®Õý³£µÄ¶¨Òå·½·¨£º
function functionName([arguments]){
Javascript statements
[return expression]
}
Àý
1:
function evalScript( i, elem ) {
if ( elem.src )
jQuery.ajax({
url:
elem.src,
async:
false,
dataType:
"script"
});
else
jQuery.globalEval(
elem.text || elem.textContent || elem.innerHTML || "" );
if ( elem.parentNode )
elem.parentNode.removeChild(
elem );
}
2.
ÄäÃûº¯Êý
ÉÏÃæµÄÆäÖеÄ
functionName
¿É
ÒÔÊ¡ÂÔ£¬³ÉΪÄäÃûº¯Êý£º
var func2 = function(…){…};
Àý
1
£º
var max = function(a, b){
if(a>b) return a;
return b;
}
Àý
2
£º
dojo.isString = function(/*anything*/ it){
//summary:
//Return true if it is a String
return !!arguments.length &&
it != null && (typeof it == &
Ïà¹ØÎĵµ£º
Õâ¾ä»°ÊÇ£ºprototypeÖж¨ÒåµÄÊǶÔÏóʵÀýÒª·ÃÎʵÄÊôÐÔ»ò·½·¨µÄÒ»¸öÌæ²¹¡£
¾ÙÀý˵Ã÷һϣº
//1£©¶¨ÒåÁËÒ»¸ö¶ÔÏó£º
function A()
{
//¸ø¶ÔÏó¶¨ÒåÒ»¸öÊôÐÔ
this.f1="this is f1";
}
//2£©ÎÒÃÇ¿ÉÒÔÕâÑùʹÓöÔÏó£º
var a = new A();
alert(a.f1)//µ¯³öÏûÏ¢£ºthis is f1
//3£©ÎÒÃÇ¿ÉÒÔÀ©Õ¹¶ÔÏó£º
A.prot ......
JavaScript ¿ÉËãÊÇÊÀ½çÉÏ×îÁ÷Ðеıà³ÌÓïÑÔ£¬ËüÔø±» Web ¿ª·¢Éè¼ÆʦÌùÉÏجÃεıêÇ©£¬ËäÈ»ÕæÕýµÄجÃÎÆäʵÊÇ DOM API£¬Õâ¸ö±»´óÁ¿µÄ¿ª·¢ÓëÉè¼ÆʦËæÊÖÄéÀ´ÔöÇ¿ËûÃÇµÄ Web Ç°¶ËµÄ½Å±¾ÓïÑÔ£¬Èç½ñÔ½À´Ô½±»ÖØÊÓ£¬ËäÔòÈç´Ë£¬JavaScript ÈÔȻӵÓкܶàÈÃÈ˷ѽâµÄ¶«Î÷¡£
1. ËüÒÔ Java ÃüÃû£¬µ«²¢²»ÊÇ Java
Ëü×î³õ½Ð Mocha£¬ ½ÓןÄÃûÎ ......
JavascriptÀïÃæ·Öģʽ¶Ô»°¿òºÍ·Çģʽ¶Ô»°¿ò£¬ÆäʵÁ½ÕßÇø±ð¾ÍÊÇÔÚ¶Ô»°¿ò±»¹Ø±Õ֮ǰÓû§ÄÜ·ñÔÚͬһҳÃæµÄÆäËûµØ·½½øÐй¤×÷¡£±ÈÈç“´ò¿ªÎļþ”¶Ô»°¿ò±ãÊǵäÐ͵Äģʽ¶Ô»°¿ò£¬ÔÚÄã¶ÔÕâ¸ö¶Ô»°¿ò×ö³ö¶¯×÷²ÅÄܶԴò¿ª¸Ã¶Ô»°¿òµÄ³ÌÐò½øÐÐÆäËû²Ù×÷£¬¶ø·Çģʽ¶Ô»°¿òÔò²»±Ø¡£
ģʽ¶Ô»°¿ò£ºshowModalDialog
·Çģʽ¶Ô»°¿ò£ºsho ......
ºÜ¶àÇé¿öÏ£¬ÎÒÃÇÒªÔÚ·¢Ë͵½ºǫ́´¦ÀíÇ°£¬ÅжÏÒ»ÏÂËùÉÏ´«µÄÎļþÊDz»ÊÇ·ûºÏ´óСҪÇó£¬Æäʵ½Å±¾¿ÉÒԺܷ½±ãµÄ°ïÖúÎÒÃÇʵÏÖ£¬´úÂëÈçÏÂ
<html>
<head>
<title>JavaScript_»ñÈ¡Îļþ´óС_°¢·½Ë÷</title>
</head>
<body>
<input type="file" name="file1" id="file1" size="40" onchan ......
ÉîÈëÀí½âJavaScriptµÄ±äÁ¿×÷ÓÃÓò
http://www.cnblogs.com/rainman/archive/2009/04/28/1445687.html
ÔÚѧϰJavaScriptµÄ±äÁ¿×÷ÓÃÓò֮ǰ£¬ÎÒÃÇÓ¦µ±Ã÷È·¼¸µã£º
a¡¢JavaScriptµÄ±äÁ¿×÷ÓÃÓòÊÇ»ùÓÚÆäÌØÓеÄ×÷ÓÃÓòÁ´µÄ¡£
b¡¢JavaScriptûÓп鼶×÷ÓÃÓò¡£
c¡¢º¯ÊýÖÐÉùÃ÷µÄ±äÁ¿ÔÚÕû¸öº¯ÊýÖж¼Óж¨Òå¡£
1¡¢JavaScriptµÄ×÷ÓÃÓòÁ´ ......