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

javascriptѧϰÈÕÖ¾¶þ

1¡¢ÔËËã·û++ΪÀÛ¼Ó£¬Èôx=5£¬y=++x£¬Ôòy=6£»ÔËËã·û- -ΪµÝ¼õ£¬Èôx=5£¬y=--x,Ôòy=4
2¡¢Ìõ¼þÔËËã·û£ºgreeting=(visitor= =”PRES”)?”Dear President”:”Dear”;
Èç¹û±äÁ¿visitorÖеÄÖµÊÇ“PRES”£¬ÔòÏò±äÁ¿greeting¸³Öµ“Dear President”,·ñÔò¸³Öµ“Dear”
3¡¢¿ÉÒÔÓÃÒÔÏ·½·¨µÃµ½ä¯ÀÀÆ÷ʱ¼ä£º
Var d = new Data()
Var time = d.getHours()
TheDay = d.getDay()         µÃµ½ÐÇÆÚ¼¸
4¡¢javascript switch Óï¾ä
  Switch (n)
{
case 1;
Ö´ÐдúÂë¿é1
break
case 2:
Ö´ÐдúÂë¿é2
break
default:
    Èç¹ûn¼È²»ÊÇÒ²²»ÊÇ2£¬ÔòÖ´Ðд˴úÂë
}
5¡¢javascriptµÄÈýÖÖÏûÏ¢¿ò£º¾¯¸æ¿ò(alert)¡¢È·ÈÏ¿ò(confirm)¡¢Ìáʾ¿ò(prompt)
¾¯¸æ¿òµÄÓ÷¨£º
<html>
<head>
<script type="text/javascript">
function disp_alert()
{
alert("ÔÙ´ÎÏòÄúÎʺã¡ÔÚÕâÀÎÒÃÇÏòÄúÑÝʾ" + '\n' + "ÈçºÎÏò¾¯¸æ¿òÌí¼ÓÕÛÐС£")
}
</script>
</head>
<body>
 
<input type="button" onclick="disp_alert()" value="ÏÔʾ¾¯¸æ¿ò" />
 
</body>
</html>
È·ÈÏ¿òµÄÓ÷¨£ºÓû§ÐèÒªµã»÷È·¶¨»òÈ¡Ïû°´Å¥²ÅÄܼÌÐø½øÐвÙ×÷£¬Èç¹ûµã»÷È·ÈÏ£¬ÄÇô·µ»ØֵΪtrue£¬Èç¹ûÓû§µã»÷È¡Ïû£¬ÄÇô·µ»ØֵΪfalse.
Ìáʾ¿òµÄÓ÷¨£º
¾­³£ÓÃÓÚÌáʾÓû§ÔÚ½øÈëÒ³ÃæÇ°ÊäÈëij¸öÖµ¡£µ±Ìáʾ¿ò³öÏÖºó£¬Óû§ÐèÒªÊäÈëij¸öÖµ£¬È»ºóµã»÷È·ÈÏ»òÈ¡Ïû°´Å¥²ÅÄܼÌÐø²Ù×Ý¡£Èç¹ûÓû§µã»÷È·ÈÏ£¬ÄÇô·µ»ØֵΪÊäÈëµÄÖµ¡£Èç¹ûÓû§µã»÷È¡Ïû£¬ÄÇô·µ»ØֵΪ null¡£
Óï·¨£ºprompt("Îı¾","ĬÈÏÖµ")
6¡¢do whileÑ­»·
ÀûÓôÎÑ­»·Ê±£¬¼´Ê¹²»Âú×ãÌõ¼þʱ£¬Ò²»áÑ­»·Ò»´Î£¬ÒòΪÏÈdoÔÙÀ´ÑéÖ¤
7¡¢breakÃüÁî»áÖжϵ±Ç°Ñ­»·£¬ÒÔºóµÄÒ²²»Ö´ÐÐÁË
   ContinueÃüÁî»áÖжϵ±Ç°µÄÑ­»·£¬È»ºó´ÓϸöÖµ¿ªÊ¼Ö´ÐÐ
8¡¢err.number----´íÎóºÅ
   Err.description----´íÎóÃèÊö
9¡¢²âÊÔ´úÂëÖеĴíÎó¿ÉÒÔÓÃtry……catch£¬ÆäÖÐtryÖ®ºóÊÇÐèÒªÖ´ÐеĴúÂ룬¶øcatchÖ®ºóÊDz¶×½µ½´íÎóÖ®ºó´¦Àí´íÎóµÄ´úÂë
10¡¢throwÉùÃ÷ÊÇ´´½¨Òì³£»ò´íÎ󣬿ÉÅäºÏtry….catchʹÓá£
Àý£º<html>
<body>
<script type="text/javascript">
var x=prompt("ÇëÊäÈë 0 ÖÁ 10 Ö®¼äµÄÊý£º","")//¶¨ÒåÌáÊ


Ïà¹ØÎĵµ£º

JavaScriptѧϰ_ChromeÓëInternet Explorer

Chrome ÓµÓиü¿ìËÙµÄJavaScript£»
±àдÈçÏÂС³ÌÐò£º
<html>
<script language = "javascript">

var sum = 0;
var start = new Date;
for(var i = 0; i < 1000001; i++){
sum+=i;
}
var stop = new Date;
document.write("´Ó1µ½1000000µÄÀÛ¼Ó½á¹û£º" + sum + ";" + "<br/> ......

javascriptÃæÏò¶ÔÏóѧϰ

¼ò½é

ÔÚjavascript
ÖÐÎÒÃÇ×îͨ³£µÄ×ö·¨ÊǶ¨ÒåÒ»¸öÒ»¸öµÄ·½·¨(function)
£¬È»ºóͨ¹ý¸ö¸öfunction
Ö®¼äµÄµ÷ÓÃÀ´ÊµÏÖij¸ö¹¦ÄÜ£¬Ò²¾ÍÊÇ¿ÉÒÔÕâÑù½²£¬function
ËƺõÊÇjs
ÖеÄÒ»¸ö×îС×éÖ¯µ¥Ôª,
ÎÒÃÇÒѾ­ÊìϤÁ˸÷ÖÖÃæÏò¶ÔÏó¶ÔÏóÓïÑÔ(java,c#..),
ÎÒÃÇÒѾ­Ï°¹ßÁËʹÓø÷¸÷ÀàÀ´·â×°¸÷¸ö²Ù×÷£¬Èúóͨ¹ý¸÷¸ö¶ÔÏóÖ®¼äµÄ½» ......

DropDownListµ÷ÓÃjavascript¿ØÖƱí¸ñÐÐtrµÄÏÔʾÓëÒþ²Ø

DropDownListµ÷ÓÃjavascript¿ØÖƱí¸ñÐÐtrµÄÏÔʾÓëÒþ²Ø
<mce:script language="javascript"><!--
function cao() {
if(document.all.ddl_class.value=="0")
{
hongtou.style.display="none";
wailai.style.display="none";
wailai1.style.display ......

JavaScript µ¹¼ÇʱÆ÷

¿´¹ýÏã¸ÛºÍ°ÄÃŻعéµÄµ¹¼ÇʱÆ÷ûÓУ¬ÊDz»ÊÇÏë¸ø×Ô¼ºµÄ±È½ÏÓÐÒâÒåµÄÈÕ×ÓÒ»¸ö¼ÇʱÆ÷ÌáÐÑ×Ô¼º£¬JavaScript¸øÁËÎÒÃÇÕâ¸ö»ú»áȥʵÏÖÎÒÃǵÄÏë·¨£¬¿´¿´ÏÂÃæµÄÀý×Ó£º
ÔÚ<body>ºÍ</body>±êÇ©¼äÊäÈëÒÔÏ´úÂë
<SCRIPT LANGUAGE="JavaScript">
var urodz= new Date("December 25,2002");
var s="Ê¥µ®½Ú";
//»ñÈ¡ ......

15 ¸ö JavaScript Web UI ¿â

¼¸ºõËùÓеĸ» Web Ó¦Óö¼»ùÓÚÒ»¸ö»ò¶à¸ö Web UI ¿â»ò¿ò¼Ü£¬ÕâЩ UI
¿âÓë¿ò¼Ü¼«´óµØ¼ò»¯ÁË¿ª·¢½ø³Ì£¬²¢´øÀ´Ò»Ö£¬¿É¿¿£¬ÒÔ¼°¸ß¶È½»»¥ÐÔµÄÓû§½çÃæ¡£±¾ÎĽéÉÜÁË 15 ¸ö·Ç³£Ç¿´óµÄ JavaScript Web UI
¿â£¬·Ç³£Êʺϸ÷ÖÖ¸÷ÖÖ¹æÄ£µÄ¸» Web Ó¦ÓõĿª·¢¡£
LivePipe
LivePipe
UI
»ùÓÚ Prototype Javascript ¿ò¼Ü
£¬°üº ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ