JavaScriptÖеÄDate¶ÔÏó
1.ÉùÃ÷Ò»¸öDateʱ¼ä¶ÔÏóµÄ·½Ê½ÓÐÒÔÏÂÈýÖÖ
Date()£º±íʾ¹¹ÔìÒ»¸öµ±Ç°ÏµÍ³Ê±¼ä¶ÔÏó
Date(int year,int month,int day)£º¹¹ÔìµÄʱ¼ä¶ÔÏóËùÖ¸ÏòµÄʱ¼äΪ Ä꣺1900+year;Ô£ºmonth+1;ÈÕ£ºday;ʱ,·Ö,Ã룺00
Date(int millsecond)£º¹¹ÔìµÄʱ¼ä¶ÔÏóËùÖ¸ÏòµÄʱ¼äΪ1970Äê1ÔÂ1ÈÕ08ʱ00·Ö00Ãë+millsecondºÁÃëËùµÃµÄʱ¼ä
2.Date¶ÔÏó³£Óõķ½·¨
getYear()£º»ñÈ¡"µ±Ç°¶ÔÏóËùÖ¸ÏòµÄÄê·Ý-1900"ËùµÃµÄÄê·Ý
getMonth()£º»ñÈ¡"µ±Ç°¶ÔÏóËùÖ¸ÏòµÄÔ·Ý-1"ËùµÃµÄÔ·Ý
getDate()£º»ñÈ¡µ±Ç°¶ÔÏóµÄÈÕÆÚ
getDay()£º»ñÈ¡µ±Ç°¶ÔÏóµÄÈÕÆÚ
getHours()£º»ñÈ¡µ±Ç°¶ÔÏóµÄСʱ
getMinutes()£º»ñÈ¡µ±Ç°¶ÔÏóµÄ·ÖÖÓ
getSeconds()£º»ñÈ¡µ±Ç°¶ÔÏóµÄÃëÖÓ
getTime()£º»ñÈ¡µ±Ç°Ê±¼ä¶ÔÏó¾àÀë1970Äê1ÔÂ1ÈյĺÁÃëÊý
setYear(int year)£º½«Äê·ÝÉèÖÃΪ1900+year
setMonth(int month)£º½«Ô·ÝÉèÖÃΪmonth+1
setDate(int date)£ºÉèÖÃÈÕÆÚ
setHours(int hour)£ºÉèÖÃСʱ
setMinutes(int minute)£ºÉèÖ÷ÖÖÓ
setSeconds(int second)£ºÉèÖÃÃëÖÓ
Ïà¹ØÎĵµ£º
Ò»£¬½Å±¾³ÌÐòÓëjavascript
ǶÌ×ÔÚHTMLÖеÄÓïÑÔ³ÆÎª½Å±¾ÓïÑÔ£¬ä¯ÀÀÆ÷±ØÐë¾ßÓнű¾ÒýÇæ¶ÔǶÈëHTMLÖеĽű¾³ÌÐò½øÐнâÊÍ¡£
eg:
<HTML>
<script language="JavaScript">
//VBScript,Jscript,ECMAScript
<!--
alert(n ......
IE¿ÉÒÔµ÷Óãº
<script type="text/javascript">
// ˵Ã÷£º»ñÈ¡Ò³ÃæÉÏÑ¡ÖеÄÎÄ×Ö
// ÕûÀí£ºhttp://www.CodeBit.cn
function getSelectedText() {
if (window.getSelection) {
// This technique is the most likel ......
IE¹¦ÄÜ»ã×Ü
<OBJECT id=WebBrowser height=0 width=0
classid=CLSID:8856F961-340A-11D0-A96B-00C04FD705A2></OBJECT>
<INPUT onclick=document.all.WebBrowser.ExecWB(1,1) type=button value=´ò¿ª name=Button1>
<INPUT onclick=document.all.WebBrowser.ExecWB(4,1) type=button value=Áí´ ......
ÐèÒªÒýÈëjquery-1.3.2.js
»ñÈ¡¿í¶È
function getCurrentWidth(){
var currentWidth = 0;
// handle IE 6
if ($.browser.msie && $.browser.version < 7) {
var scrollWidth = Math.max(
document.documentElement.scrollWidth,
docu ......