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

JavaScriptÈÕÆÚ´¦Àíº¯Êý´óÈ«

1¡£½â¾ö2000ÎÊÌâ
function y2k(number) { return (number < 1000) ? number + 1900 : number; }
2¡£¼ì²éÈÕÆÚÊÇ·ñºÏ·¨
// µ±ÊäÈë²ÎÊýΪisDate(dd,mm,ccyy)ʱ£¬±íʾҪ¼ì²éÄ꣬Ô£¬ÈÕ
// µ±ÊäÈë²ÎÊýΪisDate(dd,mm) ±íʾĬÈÏÄêΪµ±Ç°Äê
// µ±ÊäÈë²ÎÊýΪisDate(dd)     ±íʾĬÈÏÄ꣬ÔÂΪµ±Ç°ÄêÔÂ
// ×¢ÒâÊäÈëÔ·ݱ£Ö¤ÔÚ1-12ÒÔÄÚ¡£
function isDate (day,month,year) {
     var today = new Date();
     year = ((!year) ? y2k(today.getYear())year);
     month = ((!month) ? today.getMonth():month-1);
     if (!day) return false
     var test = new Date(year,month,day);86oo.comÌṩ¸÷Àà½Ì³Ì
     if ( (y2k(test.getYear()) == year) &&
          (month == test.getMonth()) &&
          (day == test.getDate()) )
         return true;
     else
         return false
}
ÒÔÏÂÊǵ÷ÓÃÀý×Ó£º
if (isDate(31,2,1997))
     document.write("Valid");
else
     document.write("Invalid");
3¡£ÈçºÎÅжÏÁ½¸öÈÕÆÚÖеļä¸ôÌìÊý
function daysElapsed(date1,date2) {
     var difference = Date.UTC(date1.getYear(),date1.getMonth(),date1.getDate(),0,0,0)
                    - Date.UTC(date2.getYear(),date2.getMonth(),date2.getDate(),0,0,0);
     return difference/1000/60/60/24;86oo.com
}
4¡£ÈçºÎ½«Ò»¸öÏÂÀ­Áбí¿òÖеÄÔ·ݴ«µÝµ½ÁíÒ»Ò³
<FORM>
<SELECT NAME="selectName">
<OPTION>January
<OPTION>February
<OPTION>March
<OPTION>April
<OPTION>May
<OPTION>June
<OPTION>July
<OPTION>August
<OPTION>Spetember
<OPTION


Ïà¹ØÎĵµ£º

JavaScript »ñÈ¡¶ÔÏóµÄ¸ß¶ÈºÍ¿í¶ÈÏêϸ˵Ã÷

scrollHeight: »ñÈ¡¶ÔÏóµÄ¹ö¶¯¸ß¶È¡£
scrollLeft:ÉèÖûò»ñȡλÓÚ¶ÔÏó×ó±ß½çºÍ´°¿ÚÖÐÄ¿Ç°¿É¼ûÄÚÈݵÄ×î×ó¶ËÖ®¼äµÄ¾àÀë
scrollTop:ÉèÖûò»ñȡλÓÚ¶ÔÏó×¶ËºÍ´°¿ÚÖпɼûÄÚÈݵÄ×¶ËÖ®¼äµÄ¾àÀë
scrollWidth:»ñÈ¡¶ÔÏóµÄ¹ö¶¯¿í¶È
offsetHeight:»ñÈ¡¶ÔÏóÏà¶ÔÓÚ°æÃæ»òÓɸ¸×ø±ê offsetParent ÊôÐÔÖ¸¶¨µÄ¸¸×ø±êµÄ¸ß¶È
offsetL ......

Javascript¼ì²âMedia Player°æ±¾£¡

      ÔÚweb¿ª·¢¹ý³ÌÖУ¬¾­³£»á³öÏÖÒòΪ¿Í»§¶ËµÄijЩÈí¼þ°æ±¾ÎÊÌ⣬¶øµ¼ÖÂÖÖÖÖÎÊÌâ¡£ÕâÀ´Ìì¾ÍÒòΪMedia Player°æ±¾µÄÎÊÌ⣬Òý·¢ÁËÒ»¸ö²»´ó²»Ð¡µÄÎÊÌâ¡£ÔÚµ÷ÓÃMedia Player²¥·ÅÊÓƵµÄʱºò£¬Media Player9¾¹È»²¥·Å²»ÁË ...  ...
 
²»¶à˵ÁË£¬»¹ÊÇÌù´úÂë°É£¡
 
<html xmlns="h ......

javascript ´¥·¢Ê¼þÁбí


Ò»°ãʼþ
ʼþä¯ÀÀÆ÷Ö§³ÖÃèÊö
onClick
HTML: 2 | 3 | 3.2 | 4 
Browser: IE3 | N2 | O3 
Êó±êµã»÷ʼþ£¬¶àÓÃÔÚij¸ö¶ÔÏó¿ØÖƵķ¶Î§ÄÚµÄÊó±êµã»÷
onDblClick
HTML: 2 | 3 | 3.2 | 4 
Browser: IE4 |&nb ......

javascriptÖ®getAttribute()·½·¨

getAttribute()·½·¨
 ¡ñÒ»·ÝÎĵµ¾ÍÊÇÒ»¿Ã½ÚµãÊ÷¡£
  ¡ñ½Úµã·ÖΪ²»Í¬µÄÀàÐÍ£ºÔªËؽڵ㡢ÊôÐÔ½ÚµãºÍÎı¾½ÚµãµÈ¡£
  ¡ñgetElementById()·½·¨½«·µ»ØÒ»¸ö¶ÔÏ󣬸öÔÏó¶ÔÓ¦×ÅÎĵµÀïµÄÒ»¸öÌض¨µÄÔªËؽڵ㡣
  ¡ñgetElementsByTagName()·½·¨½«·µ»ØÒ»¸ö¶ÔÏóÊý×飬ËüÃÇ·Ö±ð¶ÔÓ¦×ÅÎĵµÀïµÄÒ»¸ ......

JavaScript CSS StyleÊôÐԲο¼

CSSÓï·¨ (²»Çø·Ö´óСд) ¡¡¡¡JavaScriptÓï·¨ (Çø·Ö´óСд)
border ¡¡¡¡border
border-bottom ¡¡¡¡borderBottom
border-bottom-color ¡¡¡¡borderBottomColor
border-bottom-style¡¡¡¡ borderBottomStyle
border-bottom-width ¡¡¡¡borderBottomWidth
border-color ¡¡¡¡borderColor
border-left ¡¡¡¡borderLeft ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ