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

ÕÅТÏêjavascript½²×ù±Ê¼ÇÒ»

Ò»£¬½Å±¾³ÌÐòÓëjavascript
      ǶÌ×ÔÚHTMLÖеÄÓïÑÔ³ÆΪ½Å±¾ÓïÑÔ£¬ä¯ÀÀÆ÷±ØÐë¾ßÓнű¾ÒýÇæ¶ÔǶÈëHTMLÖеĽű¾³ÌÐò½øÐнâÊÍ¡£
     eg:
     <HTML>
<script language="JavaScript">
//VBScript,Jscript,ECMAScript
<!--
alert(new Date());//alert·½·¨Ö»ÓÐÖ±µ½Óû§µ¥»÷µ¯³ö´°¿ÚµÄ“È·¶¨”²Å·µ»Ø
// -->
</script>
</HTML>
     ¿ÉÒÔͨ¹ýscript±êÇ©µÄlanguageÊôÐÔÖ¸¶¨ËùÓõĽű¾ÓïÑÔ£¬VBScriptÊÇ΢ÈíµÄ½Å±¾ÓïÑÔ£¬Ò²ÊÇASPµÄ·þÎñÆ÷¶ËµÄ½Å±¾ÓïÑÔ¡£
     <script language="VBScript">
<!--
//VBScriptµÄÓï¾ä²»Ó㻷ָÇÒNetScaptµÈä¯ÀÀÆ÷²»Ö§³ÖVBScript½Å±¾
alert(Date())
//-->
</script>
¶þ£¬JavaScriptµÄ¼ò½é
     Ç°Éí½Ð×öLiveScript,ÊÇÒ»ÖÖ»ùÓÚ¶ÔÏó(object-based)ºÍʼþÇý¶¯(Event Driven)²¢¾ßÓа²È«ÐÔÄܵĽű¾ÓïÑÔ£¬ÊÇNetScapte¹«Ë¾µÄ²úÆ·¡£
    1£¬javaScriptÓëJava
     ÊÇÁ½¸ö¹«Ë¾¿ª·¢µÄÁ½¸ö²»Í¬µÄ²úÆ·£¬×÷ÓÃÓëÓÃ;²»Ò»Ñù£¬JavaScript²¢²»ÊÇJavaµÄ×Ó¼¯£¬JavaScriptÊÇ»ùÓÚ¶ÔÏóµÄ£¬¶ø²»ÊÇÃæÏò¶ÔÏóµÄ½Å±¾ÓïÑÔ¡£
    2£¬JavaScript,JScript,ECMAScript
     ÓÉÓڵò»µ½netScapter¹«Ë¾¼¼ÊõµÄÐí¿É£¬Î¢Èí¿ª·¢³öJScript£¬ECMAÁªºÏnetScaptÓëMicrosoft½«½Å±¾ÓïÑÔ½øÐбê×¼»¯£¬³ÆΪECMAScript¡£
    ä¯ÀÀÆ÷±ØÐë¾ßÓÐÏàÓ¦µÄ½Å±¾ÓïÑԵĽű¾ÒýÇæ.
Èý£¬½Å±¾´úÂëµÄ°Ú·ÅλÖÃ
    1£¬·ÅÖÃÔÚ<script></script>±êÇ©¶ÔÖ®¼ä£¬Èç
    <script type="text/javascript">
<!--
var x=3;
// -->
</script>
<p>ÕâÊÇÒ»¸öHTML¶ÎÂä</p>
<script type="text/javascript">
<!--
alert(x);
// -->
</script> =><p>ÕâÊÇÒ»¸öHTML¶ÎÂä</p>
<script type="text/javascript">
<!--
var x=3;
alert(x);
// -->
</script>
    ÓÉÓھɰ汾µÄä¯ÀÀÆ÷²»Ö§³Öjavascript,·ÀÖ¹°Ñjavascript´úÂë¸úHTMLdiamondÏÔʾÔÚÆÁÄ»ÉÏ£¬¿ÉÒÔ²ÉÓÃHTML×¢ÊÍ£º
    <HTML>
<script language="


Ïà¹ØÎĵµ£º

JavascriptʵÓú¯Êý

function addLoadEvent(fun) {
var oldonload = window.onload;
if(typeof(window.onload) != 'function') {
window.onload = fun;
} else {
window.onload = function() {
oldonload();
fun();
}
}
}
//function insertAfter(newElement, targentElement)
function insertAfter(insertedNode, ......

JavascriptÈÕÆÚ¸ñʽ ÕýÔò yyyy MM dd

reg = /^((((((0[48])|([13579][26])|([2468][048]))00)|([0-9][0-9]((0[48])|([13579][26])|([2468][048]))))-02-29)|(((000[1-9])|(00[1-9][0-9])|(0[1-9][0-9][0-9])|([1-9][0-9][0-9][0-9]))-((((0[13578])|(1[02]))-31)|(((0[1,3-9])|(1[0-2]))-(29|30))|(((0[1-9])|(1[0-2]))-((0[1-9])|(1[0-9])|(2[0-8]))))))$/i; ......

javascript¿ØÖÆflash¶¯»­

Ò»¡¢½éÉÜÓëFlash¶¯»­¿ØÖÆÓйصÄjavascriptº¯Êý£º 
º¯ÊýÃû                              Ê¹Óà         &n ......

JavaScript_Ñ­»·26¸öÓ¢ÎÄ×ÖĸµÄ·½·¨

×î½üÔÚCSDNÉÏÓÐÈËÎÊ£¬ÔõôÓÃJSÑ­»·26¸öÓ¢ÎÄ×Öĸ£¬Ï붼ûÏ룬дÏÂÒÔÏ´úÂë
<script type="text/javascript">
<!--
var character = new Array("A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","X","Y","Z");
for(var i=0;i<25;i++)
{
alert(character[i]);
} ......

javascriptÖеÄarguments


ÔÚjavascriptº¯ÊýÌåÄÚ£¬±êʶ·ûarguments¾ßÓÐÌØÊ⺬Òå¡£ËüÊǵ÷ÓöÔÏóµÄÒ»¸öÌØÊâÊôÐÔ£¬ÓÃÀ´ÒýÓÃArguments¶ÔÏó¡£Arugments¶ÔÏó¾ÍÏñÊý×飬עÒâÕâÀïÖ»ÊÇÏñ²¢²»Êǹþ¡£
javascriptº¯ÊýÌåÄÚ£¬argumentsÏñÊý×é(²¢²»ÊÇÕæµÄÊý×飬ÊÇÒ»¸öArguments¶ÔÏó£¬ÔÙ´ÎÇ¿µ÷)Ò»Ñù£¬ÓÐlengthÊôÐÔ£¬¿ÉÒÔ´ú±í´«¸øº¯ÊýµÄ²ÎÊýµÄ¸öÊý¡£
ÒýÓÃÒ»¸öÐÎʽ² ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ