JavaScriptµÄ±Õ°ü
±Õ°ü£º
ECMAScriptÖ§³Ö±Õ°ü¡£Ëùν±Õ°ü£¬¾ÍÊǺ¯ÊýÄÜʹÓú¯ÊýÍⶨÒåµÄ±äÁ¿¡£
var iBaseNum = 10;
function addNumbers(iNum1, iNum2)
{
function doAddition()
{
return iNum1 + iNum2 + iBaseNum; //µ÷ÓÃÍⲿ±äÁ¿
}
return doAddition();
}
Ïà¹ØÎĵµ£º
Ã²ËÆCSDNÀïµÄ¶¼ÊÇרҵÈËÊ¿£¬¸ßÊÖ¿ÉÒÔÂÓ¹ýÁË£¬ºÇºÇ¡£
Ò»ÏÂÊÇÔ´Â룺
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content ......
À´Ô´£ºweb-developer.csdn.net/?p=239 JavaScript ÊÇÒ»¿îÇ¿´óµÄ¹ã·ºÔËÓÃÓÚÏÖ´úWebÕ¾µã¼°Ó¦ÓõĽű¾ÓïÑÔ¡£×÷Ϊһ¸ö¼¼ÒÕ¾«Õ¿µÄ Web ¿ª·¢Õߣ¬ÕÆÎÕJavaScript¿ÉÒÔÔöÇ¿Óû§µÄʹÓÃÌåÑ飬Ìṩ½»»¥¼°¸»¿Í»§¶ËµÈ¹¦ÄÜ¡£ ¾¡¹ÜJavaScript µÄÓï·¨·Ç³£¼òµ¥£¬µ«¶ÔÓÚд³ÌÐò¶øÑÔÈÔÈ»ÊÇÀ§ÄÑÖØÖØ£¬¾ÍÊÇÒòΪËüµÄÔËÐл·¾³£º»ùÓÚWebä¯ÀÀÆ÷¡£ ÒÔ ......
1.Dean Edwards±àдµÄPacker£¨http://dean.edwards.name/packer/£©£¬ÓÃÓÚѹËõJavaScript
2.»ñÈ¡JQuery£ºhttp:/jquery.com
http://docs.jquery.com/Downloading_jQuery ÏÂÔØ¸÷¸ö°æ±¾¼°ÏàÓ¦°ïÖúÎ ......
ÓÃÓÚö¾Ù¶ÔÏóµÄÊôÐÔ
Àý£º
for(sProp in window)
{
alert(sProp); //ÏÔʾBOM window¶ÔÏóµÄËùÓÐÊôÐÔ¡£
}& ......
withÓï¾ä
ÓÃÓÚÉèÖôúÂëÌØ¶¨¶ÔÏóµÄ×÷ÓÃÓò¡£
Àý£º
var sMessage = "hello world";
with(sMessage)
{
&nbs ......