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

ѧϰJavaScript£¨Ò»£©

Õ⼸ÌìÔÚѧJavaScriptµÄ»ù´¡ÖªÊ¶£¬¾Í°Ñ»ù´¡µÄ֪ʶÕûÀíһϡ£
 
1¡¢JavaScriptµÄËÄÖÖ»ù±¾µÄÊý¾ÝÀàÐÍ£ºÊýÖµ£¨ÕûÊýºÍʵÊý£©¡¢×Ö·û´®ÐÍ£¨ÓÓ”»òÕß‘’À¨ÆðÀ´µÄ×Ö·û»òÕßÊýÖµ£©¡¢²¼¶ûÐÍ£¨true»òfalse£©¡¢¿ÕÖµ¡£
2¡¢JavaScriptµÄ±äÁ¿
ÉùÃ÷±äÁ¿£º±äÁ¿Ôڽű¾ÖеÚÒ»´Î³öÏÖʱºòÔÚÉùÃ÷ÖУ¨var£©£¬±äÁ¿µÄ½Å±¾µÚÒ»´ÎÓõ½Ê±¾ÍÉèÖÃÓÚÄÚ´æÖУ¬±ãÓÚÒÔºóʹÓ᣶ÔÓÚ±äÁ¿»¹ÓÐÒ»¸öÖØÒªÐÔ------ÄǾÍÊDZäÁ¿µÄ×÷ÓÃÓò¡£ÔÚJavaScriptͬÑùÓÐÈ«¾Ö±äÁ¿ºÍ¾Ö²¿±äÁ¿¡£È«¾Ö±äÁ¿Ö®ËùÒÔÔÚËùÓк¯ÊýÖ®Í⣬Æä×÷ÓÃÕû¸öº¯Êý£¬¶ø¾Ö²¿º¯ÊýÊǶ¨ÒåÔÚº¯ÊýÌåÖ®ÄÚ£¬Ö»¶Ô¸Ãº¯ÊýʹÓ㬶ø¶ÔÆäËûº¯ÊýÔòÊDz»¿É¼ûµÃ¡£
3¡¢±í´ïʽºÍÔËËã·û
±í´ïʽ·ÖËãÊõ±í´ïʽ¡¢×Ö´®±í´ïʽ¡¢¸³Öµ±í´ïʽ¡¢²¼¶û±í´ïʽ
ÔËËã·û·Öµ¥Ä¿ÔËËã·ûºÍË«Ä¿ÔËËã·û¡¢ÈýÄ¿ÔËËã·û
µ¥Ä¿ÔËËã·û£º-£¨È¡·´£©¡¢~£¨È¡²¹£©¡¢++£¨µÝ¼Ó1£©¡¢- -£¨µÝ¼õ1£©
Ë«Ä¿ÔËËã·û£º²Ù×÷Êý1  ÔËËã·û  ²Ù×÷Êý2
ÈýÄ¿ÔËËã·û£º²Ù×÷Êý£¿½á¹û1£º½á¹û2
ʵÀý:¼òµ¥µÄÅÜÂíµÆЧ¹û£º
<!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; charset=gb2312" />
<script language="javascript">
var msg="»¶Ó­´ó¼Ò½øÈ룬ÕâÊÇÒ»¸ö¼òµ¥µÄÅÜÂíµÆµÄЧ¹û£¡";
var speech = 100;
var seq=0;
 
function Scroll() {
document.pmdForm.pmdtext.value = msg.substring(seq, msg.length)+ msg.substring(0, msg.length);
seq++;
if ( seq > msg.length ) { seq = 0 };
window.setTimeout("Scroll();", speech );
}
</script>
<title>ÎÞ±êÌâÎĵµ</title>
</head>
 
<body OnLoad="Scroll();" >
<form name="pmdForm">
<input name="pmdtext" type="text" />
</form>
</body>
</html>
Ч¹ûÈçÏÂͼ£º
 
4¡¢JavaScriptµÄ³ÌÐò¹¹³É
³ÌÐò¿ØÖÆÁ÷
IfÌõ¼þÓï¾ä¡¢forÑ­»·Óï¾ä¡¢whileÑ­»·¡¢breakºÍcontinueÓï¾ä
º¯Êý
4.1 JavaScriptº¯Êý¶¨Òå
Function º¯ÊýÃû£¨²ÎÊý£¬±äÔª£©{
º¯ÊýÌ壻
Return ±í´ïʽ£»
}
˵Ã÷£º
¡¡µ±µ÷Óú¯Êýʱ,ËùÓñäÁ¿»ò×ÖÃæÁ¿¾ù¿É×÷Ϊ±äÔª´«µÝ¡£
¡¡º¯ÊýÓɹؼü×ÖFunction¶¨Òå¡£
¡¡º¯ÊýÃû£º¶¨Òå×Ô¼


Ïà¹ØÎĵµ£º

javascript ¶¯Ì¬´´½¨±í¸ñ

ÀûÓÃjsÀ´¶¯Ì¬´´½¨±í¸ñÓÐÁ½ÖÖ¸ñʽ£¬appendChild()ºÍinsertRow¡¢insertCell()¡£Á½ÖÖ·½Ê½Æäʵ²î²»¶à£¬µ«µÚÒ»ÖÖÓпÉÄÜÔÚIEÉÏÓÐÎÊÌ⣬ËùÒÔÍƼö´ó¼ÒʹÓõڶþÖÖÁË£¬Ö±½Ó˵°É¡£
1¡¢inserRow()ºÍinsertCell()º¯Êý
insertRow()º¯Êý¿ÉÒÔ´ø²ÎÊý£¬ÐÎʽÈçÏ£º
insertRow(index)£ºindex´Ó0¿ªÊ¼
Õâ¸öº¯Êý½«ÐÂÐÐÌí¼Óµ½indexµÄÄÇÒ»ÐÐÇ ......

Javascript¼ò½é

¶¨Òå
     JavascriptÊÇÒ»ÖÖ½âÊÍÐԵģ¬»ùÓÚ¶ÔÏóµÄ½Å±¾ÓïÑÔ(an interpreted, object-based scripting language)¡£
     HTMLÍøÒ³ÔÚ»¥¶¯ÐÔ·½ÃæÄÜÁ¦½ÏÈõ£¬ÀýÈçÏÂÀ­²Ëµ¥£¬¾ÍÊÇÓû§µã»÷ijһ²Ëµ¥Ïîʱ£¬×Ô¶¯»á³öÏָò˵¥ÏîµÄËùÓÐ×Ӳ˵¥£¬Óô¿HTMLÍøÒ³ÎÞ·¨ÊµÏÖ£»ÓÖÈçÑéÖ¤HTML±íµ¥(F ......

javascript»ù´¡Ñ§Ï°£¨¶þ£©

Jsѧϰ£¨¶þ£©
ÎÒÃÇÓ¦¸ÃÒѾ­·¢ÏÖ£¬´´½¨¹«ÓÐʵÀý³ÉÔ±ÆäʵºÜ¼òµ¥£¬Ò»ÖÖ·½Ê½ÊÇͨ¹ýÔÚÀàÖиø this.memberName À´¸³Öµ£¬Èç¹ûÖµÊǺ¯ÊýÖ®ÍâµÄÀàÐÍ£¬ÄǾÍÊǸö¹«ÓÐʵÀý×ֶΣ¬Èç¹ûÖµÊǺ¯ÊýÀàÐÍ£¬ÄǾÍÊǹ«ÓÐʵÀý·½·¨¡£ÁíÍâÒ»ÖÖ·½Ê½ÔòÊÇͨ¹ý¸ø className.prototype.memberName ¸³Öµ£¬¿É¸³ÖµµÄÀàÐ͸ú this.memberName ÊÇÏàͬµÄ¡£
µ½µ×ÊÇ ......

javascript»ù´¡Ñ§Ï°£¨ËÄ£©

Jsѧϰ£¨ËÄ£©
Èç¹ûµ±Ç°ÕýÔÚÖ´ÐеÄÊÇÒ»¸ö·½·¨£¬ÔòÖ´ÐÐÉÏÏÂÎľÍÊǸ÷½·¨Ëù¸½ÊôµÄ¶ÔÏó£¬Èç¹ûµ±Ç°ÕýÔÚÖ´ÐеÄÊÇÒ»¸ö´´½¨¶ÔÏ󣨾ÍÊÇͨ¹ý new À´´´½¨£©µÄ¹ý³Ì£¬Ôò´´½¨µÄ¶ÔÏó¾ÍÊÇÖ´ÐÐÉÏÏÂÎÄ¡£
Èç¹ûÒ»¸ö·½·¨ÔÚÖ´ÐÐʱûÓÐÃ÷È·µÄ¸½ÊôÓÚÒ»¸ö¶ÔÏó£¬ÔòËüµÄÖ´ÐÐÉÏÏÂÎÄÊÇÈ«¾Ö¶ÔÏ󣨶¥¼¶¶ÔÏ󣩣¬µ«Ëü²»Ò»¶¨¸½ÊôÓÚÈ«¾Ö¶ÔÏó¡£È«¾Ö¶ÔÏóÓɵ±Ç°» ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ