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

javascriptÊý×é

 optionsÊý×é
¡¡¡¡¸ÃÊý×éÊÇselect¶ÔÏóµÄÒ»¸öÊôÐÔ,¼´Ñ¡Ôñ¿òÖеÄËùÓÐÑ¡Ïî(<OPTION>)µÄÒ»¸öÁÐ±í¡£
¡¡¡¡ÊôÐÔ
¡¡¡¡defaultSelected Ñ¡ÏîÁбíÖеÄȱʡѡÏî
¡¡¡¡index Ñ¡ÏîÁбíÖÐijѡÏîµÄË÷ÒýλÖÃ
¡¡¡¡length Ñ¡ÏîÁбíÖеÄÑ¡ÏîÊý(<OPTIONS>)
¡¡¡¡name Ñ¡ÏîÁбíµÄÃû×Ö(NAMEÌØÐÔ)
¡¡¡¡selected ±íʾѡÏîÁбíÖÐijѡÏî<OPTION>ÊÇ·ñ±»Ñ¡ÖеÄÒ»¸ö²¼¶ûÀàÐÍÖµ
¡¡¡¡selectedIndex Ñ¡ÏîÁбíÖÐÒÑÑ¡ÖеÄ<OPTION>µÄË÷Òý(λÖÃ)
¡¡¡¡text Ñ¡ÏîÁбíÖÐ<OPTION>±ê¼ÇºóµÄÎı¾
¡¡¡¡value Ñ¡ÏîÁбíÖеÄVALUE=ÌØÐÔ
Array Êý×é
 
1. var array = new Array(12,23......);//´´½¨Êý×飬³õʼ»¯Êý×éֵΪ£º12£¬13....
2. var array = new Array(12);//´´½¨Êý×飬Êý×é´óСΪ12
3. var array = new Array();//´´½¨Êý×é
 for (var i = 0; i < length; i++) {
         aCity[i] = new Array();//´´½¨¶þάÊý×é
     }
 for (var i = 0; i < length; i++) {
  for (var j = 0; j < length; j++) {
          aCity[i][j] = "";//¸ø¶þάÊý×鸳ֵ
          aCity[i][j] = "";  
  }
     }
Àý×Ó£º
ͨ¹ýÉùÃ÷¶þάÊý×é°ó¶¨SELECTÏÂÀ­²Ëµ¥
<HTML>
<HEAD>
<TITLE>¶¯Ì¬¸Ä±äÏÂÀ­²Ëµ¥ÄÚÈÝʾÀý</TITLE>
</HEAD>
<SCRIPT LANGUAGE=javascript>
//¶¨ÒåÒ»¸ö¶þάÊý×éaArray,ÓÃÓÚ´æ·Å³ÇÊÐÃû³Æ¡£
var aCity=new Array();
aCity[0]=new Array();
aCity[1]=new Array();
aCity[2]=new Array();
aCity[3]=new Array();
//¸³Öµ£¬Ã¿¸öÊ¡·ÝµÄ³ÇÊдæ·ÅÓÚÊý×éµÄÒ»ÐС£
aCity[0][0]="--ÇëÑ¡Ôñ--";
aCity[1][0]="--ÇëÑ¡Ôñ--";
aCity[1][1]="¹ãÖÝÊÐ";
aCity[1][2]="ÉîÛÚÊÐ";
aCity[1][3]="Ö麣ÊÐ";
aCity[1][4]="ÉÇÍ·ÊÐ";
aCity[1][5]="·ðɽÊÐ";
aCity[2][0]="--ÇëÑ¡Ôñ--";
aCity[2][1]="³¤É³ÊÐ";
aCity[2][2]="ÖêÖÝÊÐ";
aCity[2][3]="Ïæ̶ÊÐ";
aCity[3][0]="--ÇëÑ¡Ôñ--";
aCity[3][1]="º¼ÖÝÊÐ";
aCity[3][2]="ËÕÖÝÊÐ";
aCity[3][3]="ÎÂÖÝÊÐ";
function ChangeCity()
{
var i,iProvinceIndex;
iProvinceIndex=document


Ïà¹ØÎĵµ£º

JavascriptʵÀý½Ì³Ì(8) ¼ìÑé±íµ¥ÓÐЧÐÔ

±íµ¥µÄÓÐЧÐÔ¼ìÑéÊÇjavascriptÒ»¸öºÜÓÐÓõķ½Ãæ¡£Ëü¿ÉÒÔÓÃÓÚ¼ì²éÒ»¸ö¸ø¶¨µÄ±íµ¥ÒÔ¼°·¢ÏÖ±íµ¥ÖеÄÈκÎÎÊÌ⣬±ÈÈçÒ»¸ö¿Õ°×µÄÊäÈë¿ò»òÕßÒ»¸öÎÞЧµÄE-mail£¨µç×ÓÓʼþ£©µØÖ·£¬È»ºóËü¿ÉÒÔ֪ͨÓû§²¢ÇҾͲ»»á½«ÕâЩ´íÎóµÄ±íµ¥´«¸ø·þÎñÆ÷ÒÔ½Úʡʱ¼ä¡£ÁíÍ⣬³ý´ËÒÔÍ⣬¶Ô±íµ¥±êÇ©µÄһЩÐ޸ĸúÆäËüÀàÐ͵Ľű¾ÊÇÀàËƵġ£ÒÔϵÄÀý×ÓÊÇÒ» ......

javascriptʼþÁбí


javascriptʼþÁбí½â˵
ʼþ
ä¯ÀÀÆ÷Ö§³Ö
½â˵
Ò»°ãʼþ
onclick
IE3¡¢N2
Êó±êµã»÷ʱ´¥·¢´Ëʼþ
ondblclick
IE4¡¢N4
Êó±êË«»÷ʱ´¥·¢´Ëʼþ
onmousedown
IE4¡¢N4
°´ÏÂÊó±êʱ´¥·¢´Ëʼþ
onmouseup
IE4¡¢N4
Êó±ê°´ÏºóËÉ¿ªÊó±êʱ´¥·¢´Ëʼþ
onmouseover
IE3¡¢N2
µ±Êó±êÒƶ¯µ½Ä³¶ÔÏó·¶Î§µÄÉÏ·½Ê±´¥·¢´Ëʼ ......

JavaScript ÕýÔò±í´ïʽ

½ñÌìÔÚ²©¿ÍÔ°ÉÏ¿´µ½Ò»ÆªÎÄÕ£¬¸ú×ÅѧϰÁËһϣ¬×ª¹ýÀ´Óë´ó¼Ò·ÖÏí£¬²¿·ÖÄÚÈÝÎÒ×öÁ˲¹³ä£¡ 
Ò»¡¢JavaScriptÕýÔò±í´ïʽ»ù±¾ÖªÊ¶ 
1¡¢JavaScriptÕýÔò±í´ïʽ´´½¨ºÍÓ÷¨ 
    ÉùÃ÷ÕýÔò±í´ïʽÓÐÁ½ÖÖ·½Ê½£º
a) var reCat = new RegExp("cat");
b) var reCat = /cat/;  //perl·ç¸ñ£¨ÍƼö£©& ......

ÍøÒ³ÖÆ×÷Javascript¾­µäС¼¼ÇÉ

 ×ª×Ôhttp://topic.csdn.net/u/20091014/12/44b0ac69-5228-429b-854a-a91e3736f1d4.html?64368
ÿһÏÊÇJSÖеÄС¼¼ÇÉ£¬µ«Ê®·ÖµÄʵÓã¡
1.document.write(”"); Êä³öÓï¾ä
2.JSÖеÄ×¢ÊÍΪ//
3.´«Í³µÄHTMLÎĵµË³ÐòÊÇ:document->html->(head,body)
4.Ò»¸öä¯ÀÀÆ÷´°¿ÚÖеÄDOM˳ÐòÊÇ:window->(navig ......

JavascriptÊý×é¼°Æä²Ù×÷

JavascriptÊý×é¼°Æä²Ù×÷[ת]
2009-06-10 10:10
±¾ÎĽéÉÜÈçϼ¸¸ö·½ÃæµÄÄÚÈÝ:
1.ÈçºÎ´´½¨Êý×é
2.ÈçºÎ¶ÔÊý×é½øÐвÙ×÷£¨Ìí¼Ó,ɾ³ý,¶ÁÈ¡)
3.Êý×é³£¼û·½·¨ºÍÊôÐÔ
ÈçºÎ´´½¨Ò»¸öÊý×é,Ò»°ãµØ¸ù¾Ý³õʼ»¯É趨¼òµ¥·ÖΪ3ÖÖ:
1.µ¥´¿´´½¨Êý×é:
var arr=new Array();
Òªµã:ÓÃnew¹Ø¼ü×Ö´´½¨Êý×é¶ÔÏóArray(),Array()¶ÔÏóÊÇÒ»¸ö±¾µØÀ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ