JavaScript½Ì³Ì [JavaScript]
ÒªÔÚÄãµÄÍøÒ³ÖÐʹÓà JavaScript £¬ÄãÊ×ÏȱØÐëÒªÖªµÀ¸Ã½«Ëü·ÅÔÚÄĶù¡£ÆäʵºÜ¼òµ¥£¬Ö»ÒªÔÚÄãµÄÍøÒ³£¨HTMLÎļþ£©ÖвåÈë
<SCRIPT> ºÍ </SCRIPT> ±ê¼Ç¶Ô£¬Äã¾Í¿ÉÒÔÔÚÕâÁ½¸ö±ê¼Ç¶ÓÖ®¼ä²åÈëÄãµÄ JavaScript ´úÂëÁË£º
<script>
alert("Hello world!");
</script>
ÁíÍ⣬ÄãÒ²¿ÉÒÔ½« JavaScript ´úÂë·ÅÔÚÁíÒ»¸öµ¥¶ÀµÄÎļþÀȻºóÔÚÍøÒ³£¨HTMLÎļþ£©ÖÐʹÓà “SRC= ´Ëµ¥¶ÀÎļþµÄ·¾¶/µØÖ·£¨URL£©”À´Ê¹Óô˵¥¶ÀÎļþÀïµÄ JavaScript ³ÌÐò´úÂë¡£Ò»°ã½«Õâ¸öµ¥¶ÀµÄÎļþ±£´æΪÀ©Õ¹ÃûΪ .JS
µÄÎļþ£º
<script src="mycode.js"></script>
Äã¿ÉÒÔÔÚÒ»¸ö HTML ÎļþÖÐʹÓà <SCRIPT> </SCRIPT> ±ê¼Ç¶ÔÈÎÒâ¶à´Î¡£
ËäÈ»ÔÚͨ³£Çé¿öÏÂÄ㶼»á½«ËùÓдúÂë·ÅÔÚ HTML
ÎļþµÄijһ´¦£¬µ«ÓÐЩʱºòΪÁ˱£Ö¤ÄãµÄJavaScript³ÌÐòÄܹ»ÕýÈ·ÔËÐУ¬Äã²»µÃ²»½«ËüÃÇ·ÖÉ¢µØ·ÅÔÚ HTML ÎļþµÄ¶à¸öµØ·½¡£
²»¹ÜÄãÊÇÔÚ HTML ÎļþÖÐÖ±½Ó²åÈë´úÂ뻹ÊÇͨ¹ýÍⲿµÄµ¥¶ÀµÄÎļþÀ´Ê¹Óà JavaScript £¬Í¨³£¶¼Êǽ« <SCRIPT>
</SCRIPT> ±ê¼Ç¶Ô·ÅÔÚ <HEAD> ºÍ </HEAD>
±ê¼Ç¶ÔÖ®¼ä¡£ÕâÑùÄܹ»±£Ö¤ÔÚÄãµÄÍøÒ³±»ÏÂÔص½¿Í»§¶Ëºó¿ªÊ¼Ö´ÐÐ JavaScript µÄʱºòÄãµÄ JavaScript
´úÂëÒ²ÒѾ±»ÏÂÔص½¿Í»§¶ËÁË¡£ ÕâͬʱҲÊÇ·ÅÖÃÄãµÄ JavaScript
º¯ÊýµÄºÃµØ·½£¬Èç¹ûÄãÏëҪijЩ´úÂëÔÚÄãµÄÍøÒ³ÏÔʾ³öÀ´Ö®ºó²ÅÖ´ÐеĻ°£¬Äã×îºÃ½«ÕâЩ´úÂë·ÅÔÚº¯ÊýÀµÈÍøÒ³ÏÔʾÒÔºóÔÙͨ¹ýµ÷Óú¯ÊýÀ´Ö´ÐÐËüÃÇ£¬Ç뿴ʾÀý
¡£
ÁíÍâһЩʱºò£¬ÄãÓпÉÄÜÐèÒª½«ÄãµÄ½Å±¾´úÂë·ÅÔÚ <BODY> ºÍ </BODY> ±ê¼Ç¶ÔÖ®¼ä¡£ÕâÑù×öûʲô²»¶ÔµÄ£¬ÒòΪÈç¹ûÄãÏëҪͨ¹ý JavaScript ´úÂëÀ´Éú³ÉÍøÒ³ÖÐµÄ HTML Óï¾ä£¬Äã¾Í·Ç³£ÐèÒªÕâÑù×ö£¬Ç뿴ʾÀý
¡£
JavaScript ½Å±¾±ê¼Ç
<SCRIPT> ±ê¼Ç»¹¿ÉÒÔͨ¹ý“ LANGUAGE = JavaScript µÄ°æ±¾”Óï¾äÀ´Ö¸¶¨ËùҪʹÓõÄ
JavaScript µÄ°æ±¾£¬ “=”ºÅºó±ßµÄÖµ¿ÉÒÔÊÇ£º"JavaScript"¡¢"JavaScript1.1" »òÕß
"JavaScript1.2"¡£´ó²¿·ÖµÄä¯ÀÀÆ÷¶¼»á×Ô¶¯Ê¶±ðËüËùÖ§³ÖµÄ JavaScript µÄ°æ±¾£¬¶øºöÂÔËü²»Ö§³ÖµÄ JavaScript ¡£
Äã¿ÉÒÔÕë¶Ô²»Í¬°æ±¾µÄä¯ÀÀÆ÷ʹÓò»Í¬µÄ JavaScript ½Å±¾´úÂ룬ϱߵÄÁбíÖÐÁгöÁ˲»Í¬°æ±¾µÄ Netscape ä¯ÀÀÆ÷ËùÖ§³ÖµÄ²»Í¬°æ±¾µÄ JavaScript£º
JavaScript - Netscape 2.0
JavaScript1.1 - Netscape
Ïà¹ØÎĵµ£º
Ä£·ÂjQuery£¬Éè¼ÆÁËÒ»¸ö»º´æϵͳ¡£ÏñjQuery.dataÕâÑùµÄ¶«Î÷£¬PrototypeÓëmootoolsÒ²ÓУ¬Ä¿µÄ¶¼ÊÇÓÃÀ´¸¨Öúʼþϵͳ£¬ÓÃÀ´»º´æÆäÖÐÉú³ÉµÄÊý¾Ý£¬¶ø·Ç»º´æÆÕͨº¯ÊýÉϴμÆËãµÄ½á¹û¡£PrototypeÀûÓÃÁËËüµÄHashÀ࣬mootoolsûϸ¿´£¬ËüÄÚ²¿ºÃÏñÓÃÀ´»º´æuuid¡£Ò»¸ö¹²Ê¶ÊÇ£¬ÎªÒ³ÃæÓõ½µÄÔªËØÉèÖÃuuid·Ç³£ÓÐÓã¬Òª²éÕÒÔªËØʱ£¬¿ÉÒÔ±ÜÃâÖ ......
ÓÃcall·½·¨ÊµÏּ̳Ð
function classA(sColor){
this.color=sColor;
this.sayColor=function(){
alert(this.color);
......
<!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="text/html;&n ......
ÎÊ£º
1.ÈçºÎÔÚJavaScript·ÃÎÊC#º¯Êý?
2.ÈçºÎÔÚJavaScript·ÃÎÊC#±äÁ¿?
3.ÈçºÎÔÚC#ÖзÃÎÊJavaScriptµÄÒÑÓбäÁ¿?
4.ÈçºÎÔÚC#ÖзÃÎÊJavaScriptº¯Êý?
ÎÊÌâ1´ð°¸ÈçÏ£º
javaScriptº¯ÊýÖÐÖ´ÐÐC#´úÂëÖеĺ¯Êý£º
·½·¨Ò»£º1¡¢Ê×ÏȽ¨Á¢Ò»¸ö°´Å¥£¬ÔÚºǫ́½«µ÷Óûò´¦ÀíµÄÄÚÈÝдÈëbutton_clickÖÐ;
&n ......