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 ......
¶ÔÓÚJavaScriptµÄ Stack overflow at line ´íÎó×ܽá
¸Ã´íÎóÖ»ÔÚIEÖгöÏÖ£¬³öÏÖ¸ÃÌáʾµÄÔÒòÖ÷ÒªÓÐÁ½ÖÖ£º
1. ÖØ¶¨ÒåÁËϵͳµÄ´¥·¢Ê¼þÃû³Æ×÷Ϊ×Ô¶¨Ò庯ÊýÃûÈ磺 onclick / onsubmit ... ¶¼ÊÇϵͳ±£ÁôµÄʼþÃû³Æ£¬²»ÔÊÐí×÷ÎªÖØ¶¨Ò庯ÊýÃû³Æ¡£
2. ......
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.Ò»¸öä¯ÀÀÆ ......
±íµ¥µÄ¿Í»§¶ËjavascriptÑéÖ¤Óи÷ÖÖ¸÷ÑùµÄд·¨£¬µÇ¼ΪformµÄonsubmitʼþ»òsubmit°´Å¤Ð´Ò»¸öº¯Êý¡£¶ÔÓÚС±íµ¥£¨Ö»ÓÐÒ»Á½¸ö±íµ¥ÓòµÄ±íµ¥£©¾Í²»±ØÔÙרÃÅÔÙÓÃjavascriptдһ¸öÑéÖ¤º¯ÊýÁË£¬Ö»ÐèÒªÔÚformµÄonsubmitʼþÀï¼ÓÉÏ£º
onsubmit=”return domainname.value==”?(alert(’ÇëÊäÈëËÑË÷ÄÚÈÝ’),false ......