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

JavaScriptµÄÈÕÆÚ´¦Àí

var myDate = new Date();
myDate.getYear();        //»ñÈ¡µ±Ç°Äê·Ý(2λ)
myDate.getFullYear();    //»ñÈ¡ÍêÕûµÄÄê·Ý(4λ,1970-????)
myDate.getMonth();       //»ñÈ¡µ±Ç°Ô·Ý(0-11,0´ú±í1ÔÂ)
myDate.getDate();        //»ñÈ¡µ±Ç°ÈÕ(1-31)
myDate.getDay();         //»ñÈ¡µ±Ç°ÐÇÆÚX(0-6,0´ú±íÐÇÆÚÌì)
myDate.getTime();        //»ñÈ¡µ±Ç°Ê±¼ä(´Ó1970.1.1¿ªÊ¼µÄºÁÃëÊý)
myDate.getHours();       //»ñÈ¡µ±Ç°Ð¡Ê±Êý(0-23)
myDate.getMinutes();     //»ñÈ¡µ±Ç°·ÖÖÓÊý(0-59)
myDate.getSeconds();     //»ñÈ¡µ±Ç°ÃëÊý(0-59)
myDate.getMilliseconds();    //»ñÈ¡µ±Ç°ºÁÃëÊý(0-999)
myDate.toLocaleDateString();     //»ñÈ¡µ±Ç°ÈÕÆÚ
var mytime=myDate.toLocaleTimeString();     //»ñÈ¡µ±Ç°Ê±¼ä
myDate.toLocaleString( );        //»ñÈ¡ÈÕÆÚÓëʱ¼ä
ÈÕÆÚʱ¼ä½Å±¾¿â·½·¨Áбí
Date.prototype.isLeapYear ÅжÏÈòÄê
Date.prototype.Format ÈÕÆÚ¸ñʽ»¯
Date.prototype.DateAdd ÈÕÆÚ¼ÆËã
Date.prototype.DateDiff ±È½ÏÈÕÆÚ²î
Date.prototype.toString ÈÕÆÚת×Ö·û´®
Date.prototype.toArray ÈÕÆÚ·Ö¸îΪÊý×é
Date.prototype.DatePart È¡ÈÕÆÚµÄ²¿·ÖÐÅÏ¢
Date.prototype.MaxDayOfDate È¡ÈÕÆÚËùÔÚÔµÄ×î´óÌìÊý
Date.prototype.WeekNumOfYear ÅжÏÈÕÆÚËùÔÚÄêµÄµÚ¼¸ÖÜ
StringToDate ×Ö·û´®×ªÈÕÆÚÐÍ
IsValidDate ÑéÖ¤ÈÕÆÚÓÐЧÐÔ
CheckDateTime ÍêÕûÈÕÆÚʱ¼ä¼ì²é
daysBetween ÈÕÆÚÌìÊý²î
js´úÂ룺
//---------------------------------------------------  
// ÅжÏÈòÄê  
//---------------------------------------------------  
Date.prototype.isLeapYear = function()   
{   
    return (0==this.getYear()%4&&((this.getYear()%100!=0)||(this.getYear()%400==0)));   
}   
  
//-----------------------


Ïà¹ØÎĵµ£º

JavaScript FAQ£¨¶þÊ®ËÄ£©

¶þʮһ¡¢ÉùÒô
1¡¢¿ÉÒÔ²¥·ÅÉùÒôµÄä¯ÀÀÆ÷£¨Audio-enabled Browsers£©
Q£ºÊ²Ã´¿ÉÒÔä¯ÀÀÆ÷¿ÉÒÔÖ´Ðв¥·ÅÉùÒôµÄ½Å±¾£¿
A£ºÈç¹ûÔÚÉùÒô²¥·ÅÃèÊöµÄ¼¼Êõ¿ÉÒÔÔÚMiscrosoft Internet Explorer 4.0¼°Æä¸üа汾Öй¤×÷£¬ÄÇôͬÑù¿ÉÒÔÔÚNetscape Navigator 3.0¼°Æä¸üа汾Öй¤×÷¡£ÒªÔÚInternet ExplorerÖв¥·ÅÉùÒô£¬ÔÚ4.0ÒÔ¼°ºóÀ´°æ±¾Ö ......

ÓÃCSS+JavaScriptʵÏÖÎÄ×ÖÉÁ˸Ч¹û

1. CSS
<style>
.dstyle1 {
font-size:13px;
font-weight: bold;
color: #ff6600;
}
.dstyle2 {
font-size:13px;
font-weight: bold;
color: #ffffff;
}
</style>
2. JavaScript
<script type="text/javascript">
m();
function m()
{
document.getElementById("span_new").classNa ......

Javascriptµ÷ÓÃWebService

<html>
<head>
    <title>Javascript</title>
   
    <script language="Javascript" type="text/javascript">
    function callMethod()
    {
/*http://localhost/waa/WebService.asmxΪServic ......

ÔÚjavascript ÖÐʹÓÃJSON

ÒòΪJSON ÊÇ javascript µÄÒ»¸ö×Ó¼¯£¬ËùÒÔ£¬ÔÚjavascript ÖÐʹÓÃJSONÊǷdz£¼òµ¥µÄ¡£
   
   
js ´úÂë
 
var myJSONObject = {"bindings": [  
        {"ircEvent": "PRIVMSG", "method":&n ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ