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)));
}
//-----------------------
Ïà¹ØÎĵµ£º
CSDNµÄBlog±È½ÏÇ¿º·£¬Ò»ÆªÎÄÕÂÄÜдÄÇô¶à£¬´ó¼ÒÈ¥³ö´¦¿´°É£¬ÄǶùºÃ¿´Ð©£ºhttp://blog.csdn.net/panxuan/archive/2007/11/26/1902826.aspx
ʼþÔ´¶ÔÏó
event.srcElement.tagName
event.srcElement.type
²¶»ñÊÍ·Å
event.srcElement.setCapture();
event.srcElement.releaseC ......
<a href="#" onclick="ChildNode(this);">aaa</a>Òª¸ÄΪ
<a href="#" onclick="ChildNode(event);">aaa</a>
ÎÞ·¨È¡µÃthis¶ÔÏó£¬ÒªÓÃÒÔÏ·½·¨À´È¡µÃ¡£
function ChildNode(e)
{
var evt = e ? e : (window.event ? window.event : null); //´Ë·½·¨ÎªÁËÔÚfirefoxÖеļæÈÝ
var node = evt.srcEl ......
javascript:void(0)
¸Õ¿ªÊ¼¶¼²»ÖªµÀÊÇɶÒâ˼
Æäʵ¾ÍÊÇÒ»¸öËÀÁ´½Ó£¬Ê²Ã´ÊÂÇé¶¼²»×ö¡£
<a id="link_${user.account}" href="javascript:void(0);" onclick="changSubmit();" style="cursor:pointer;height:25px;width:60px;margin-top:10px;">·¢ËÍemail</a>
Õâ¾ä ......
ÍøÒ³ÖÆ×÷Javascript¾µäС¼¼ÇÉ×ܽá
http://www.webjx.com ¸üÐÂÈÕÆÚ£º2007-10-12 01:25 ³ö´¦£ºÍøÒ³½ÌÑ§Íø ×÷ÕߣºÕ¾³¤ÕûÀí
ÿһÏî¶¼ÊÇJSÖеÄС¼¼ÇÉ£¬µ«Ê®·ÖµÄʵÓã¡
1.document.write(”"); Êä³öÓï¾ä
2.JSÖеÄ×¢ÊÍΪ//
3.´«Í³µÄHTMLÎĵµË³ÐòÊÇ:document->html->(head,body)
4.Ò»¸öä¯ÀÀÆ ......