⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ref_f-g.htm

📁 javascript函数大全HTML javascript函数大全HTML
💻 HTM
📖 第 1 页 / 共 3 页
字号:

<P>FRAMCON3.htm, which is referenced in a link object in FRAMCON1.htm, contains the following code:
<XMP>
<htm>
<BODY>
<P>This is a frame. What do you think?
</BODY>
</htm>
</XMP>


<H3>相关</H3>
<LI><A HREF="ref_d-e.htm#document_object" document_object">document</A> and <A HREF="ref_t-z.htm#window_object" window_object">window</A> objects


<!------------------------------------------------------------------------------------------------->
<HR>
<A NAME="frames_property"><H2>frames property</H2></A>
<P>An array of objects corresponding to child frames (&ltFRAME&gt tag) in source order. See <A HREF="ref_f-g.htm#frame_object" frame_object">frame</A> object.

<!------------------------------------------------------------------------------------------------->
<HR>
<A NAME="getDate_method"><H2>getDate method</H2></A>
<P>
Returns the day of the month for the specified date.

<H3>语法</H3>
<PRE><I>dateObjectName</I>.getDate()</PRE>
<P><I>dateObjectName</I> is either the name of a date object or a property of an existing object.

<H3>方法</H3>
<P><A HREF="ref_d-e.htm#Date_object" Date_object">Date</A>

<H3>描述</H3>
<P>The value returned by getDate is an integer between 1 and 31.

<H3>例子</H3>
<P>
The second statement below assigns the value 25 to the variable <I>day</I>, based on the value of the date object <I>Xmas95</I>.
<PRE>
Xmas95 = new Date("December 25, 1995 23:15:00")
day = Xmas95.getDate()
</PRE>

<H3>相关</H3>
<LI><A HREF="ref_s-s.htm#setDate_method" setDate_method">setDate</A> method
<!------------------------------------------------------------------------------------------------>
<HR>
<A NAME="getDay_method"><H2>getDay method</H2></A>
<P>
Returns the day of the week for the specified date.

<H3>语法</H3>
<PRE><I>dateObjectName</I>.getDay()</PRE>
<P><I>dateObjectName</I> is either the name of a date object or a property of an existing object.

<H3>方法</H3>
<P><A HREF="ref_d-e.htm#Date_object" Date_object">Date</A>

<H3>描述</H3>
<P>
The value returned by getDay is an integer corresponding to the day of the week: zero for Sunday, one for Monday, two for Tuesday, and so on.

<H3>例子</H3>
<P>
The second statement below assigns the value 1 to <I>weekday</I>, based on the value of the date object <I>Xmas95</I>. This is because December 25, 1995 is a Monday.
<PRE>
Xmas95 = new Date("December 25, 1995 23:15:00")
weekday = Xmas95.getDay()
</PRE>

<!------------------------------------------------------------------------------------------------>
<HR>
<A NAME="getHours_method"><H2>getHours method</H2></A>
<P>
Returns the hour for the specified date.

<H3>语法</H3>
<PRE><I>dateObjectName</I>.getHours()</PRE>
<P><I>dateObjectName</I> is either the name of a date object or a property of an existing object.

<H3>方法</H3>
<P><A HREF="ref_d-e.htm#Date_object" Date_object">Date</A>

<H3>描述</H3>
<P>
The value returned by getHours is an integer between 0 and 23.

<H3>例子</H3>
<P>
The second statement below assigns the value 23 to the variable <I>hours</I>, based on the value of the date object <I>Xmas95</I>.
<PRE>
Xmas95 = new Date("December 25, 1995 23:15:00")
hours = Xmas95.getHours()
</PRE>


<H3>相关</H3>
<LI><A HREF="ref_s-s.htm#setHours_method" setHours_method">setHours</A> method
<!------------------------------------------------------------------------------------------------>
<HR>
<A NAME="getMinutes_method"><H2>getMinutes method</H2></A>
<P>
Returns the minutes in the specified date.

<H3>语法</H3>
<PRE><I>dateObjectName</I>.getMinutes()</PRE>
<P><I>dateObjectName</I> is either the name of a date object or a property of an existing object.


<H3>方法</H3>
<P><A HREF="ref_d-e.htm#Date_object" Date_object">Date</A>

<H3>描述</H3>
<P>
The value returned by getMinutes is an integer between 0 and 59.

<H3>例子</H3>
<P>
The second statement below assigns the value 15 to the variable <I>minutes</I>, based on the value of the date object <I>Xmas95</I>.
<PRE>
Xmas95 = new Date("December 25, 1995 23:15:00")
minutes = Xmas95.getMinutes()
</PRE>

<H3>相关</H3>
<LI><A HREF="ref_s-s.htm#setMinutes_method" setMinutes_method">setMinutes</A> method
<!------------------------------------------------------------------------------------------------>
<HR>
<A NAME="getMonth_method"><H2>getMonth method</H2></A>
<P>
Returns the month in the specified date.

<H3>语法</H3>
<PRE><I>dateObjectName</I>.getMonth()</PRE>
<P><I>dateObjectName</I> is either the name of a date object or a property of an existing object.


<H3>方法</H3>
<P><A HREF="ref_d-e.htm#Date_object" Date_object">Date</A>

<H3>描述</H3>
<P>
The value returned by getMonth is an integer between zero and eleven. Zero corresponds to January, one to February, and so on.

<H3>例子</H3>
<P>
The second statement below assigns the value 11 to the variable <I>month</I>, based on the value of the date object <I>Xmas95</I>.
<PRE>
Xmas95 = new Date("December 25, 1995 23:15:00")
month = Xmas95.getDate()
</PRE>


<H3>相关</H3>
<LI><A HREF="ref_s-s.htm#setMonth_method" setMonth_method">setMonth</A> method
<!------------------------------------------------------------------------------------------------>
<HR>
<A NAME="getSeconds_method"><H2>getSeconds method</H2></A>
<P>
Returns the seconds in the current time.

<H3>语法</H3>
<PRE><I>dateObjectName</I>.getSeconds()</PRE>
<P><I>dateObjectName</I> is either the name of a date object or a property of an existing object.

<H3>方法</H3>
<P><A HREF="ref_d-e.htm#Date_object" Date_object">Date</A>

<H3>描述</H3>
<P>
The value returned by getSeconds is an integer between 0 and 59.

<H3>例子</H3>
<P>
The second statement below assigns the value 30 to the variable <I>secs</I>, based on the value of the date object <I>Xmas95</I>.
<PRE>
Xmas95 = new Date("December 25, 1995 23:15:30")
secs = Xmas95.getSeconds()
</PRE>

<H3>相关</H3>
<LI><A HREF="ref_s-s.htm#setSeconds_method" setSeconds_method">setSeconds</A> method
<!------------------------------------------------------------------------------------------------>
<HR>
<A NAME="getTime_method"><H2>getTime method</H2></A>
<P>
Returns the numeric value corresponding to the time for the specified date.

<H3>语法</H3>
<PRE><I>dateObjectName</I>.getTime()</PRE>
<P><I>dateObjectName</I> is either the name of a date object or a property of an existing object.


<H3>方法</H3>
<P><A HREF="ref_d-e.htm#Date_object" Date_object">Date</A>

<H3>描述</H3>
<P>
The value returned by the getTime method is the number of milliseconds since 1 January 1970 00:00:00. You can use this method to help assign a date and time to another date object.

<H3>例子</H3>
<P>
The following example assigns the date value of <I>theBigDay</I> to <I>sameAsBigDay</I>.

<PRE>
theBigDay = new Date("July 1, 1999")
sameAsBigDay = new Date()
sameAsBigDay.setTime(theBigDay.getTime())
</PRE>

<H3>相关</H3>
<LI><A HREF="ref_s-s.htm#setTime_method" setTime_method">setTime</A> method
<!----------------------------------------------------------------->
<HR>
<A NAME="getTimezoneOffset_method"><H2>getTimezoneOffset method</H2></A>
<P>
Returns the time zone offset in minutes for the current locale.

<H3>语法</H3>
<PRE><I>dateObjectName</I>.getTimezoneOffset()</PRE>
<P><I>dateObjectName</I> is either the name of a date object or a property of an existing object.

<H3>方法</H3>
<P><A HREF="ref_d-e.htm#Date_object" Date_object">Date</A>

<H3>描述</H3>
<P>
The time zone offset is the difference between local time and GMT. Daylight savings time prevents this value from being a constant.

<H3>例子</H3>

<PRE>
x = new Date()
currentTimeZoneOffsetInHours = x.getTimezoneOffset()/60
</PRE>

<!------------------------------------------------------------------------------------------------>
<HR>
<A NAME="getYear_method"><H2>getYear method</H2></A>
<P>
Returns the year in the specified date.

<H3>语法</H3>
<PRE><I>dateObjectName</I>.getYear()</PRE>
<P><I>dateObjectName</I> is either the name of a date object or a property of an existing object.

<H3>方法</H3>
<P><A HREF="ref_d-e.htm#Date_object" Date_object">Date</A>

<H3>描述</H3>
<P>
The value returned by getYear is the year less 1900. For example, if the year is 1976, the value returned is 76.

<H3>例子</H3>
<P>
The second statement below assigns the value 95 to the variable <I>year</I>, based on the value of the date object <I>Xmas95</I>.
<PRE>
Xmas95 = new Date("December 25, 1995 23:15:00")
year = Xmas95.getYear()
</PRE>


<H3>相关</H3>
<LI><A HREF="ref_s-s.htm#setYear_method" setYear_method">setYear</A> method
<!------------------------------------------------------------------------------------------------>
<HR>
<A NAME="go_method"><H2>go method</H2></A>
<P>
Loads a URL from the history list.

<H3>语法</H3>
<PRE>history.go(<I>delta</I> | "<I>location</I>")</PRE>
<I>delta</I> is an integer or a property of an existing object, representing a relative position in the history list.
<BR><I>location</I> is a string or a property of an existing object, representing all or part of a URL in the history list.

<H3>方法</H3>
<P><A HREF="ref_h-l.htm#history_object" history_object">history</A>

<H3>描述</H3>
<P>The go method navigates to the location in the history list determined by the argument that you specify. You can interactively display the history list by choosing History from the Window menu. Up to 10 items in the history list are also displayed on the Go menu.

<P>The <I>delta</I> argument is a positive or negative integer. If <I>delta</I> is greater than zero, the go method loads the URL that is that number of entries forward in the history list; otherwise, it loads the URL that is that number of entries backward in the history list. If delta is 0, Navigator reloads the current page.

<P>The <I>location</I> argument is a string. Use <I>location</I> to load the nearest history entry whose URL contains <I>location</I> as a substring. The <I>location</I> to URL matching is case-insensitive. Each section of a URL contains different information. See the <A HREF="ref_h-l.htm#location_object" location_object">location</A> object for a 描述 of the URL components.

<H3>例子</H3>
<P>The following button navigates to the nearest history entry that contains the string "home.netscape.com":
<PRE>
&ltP&gt&ltINPUT TYPE="button" VALUE="Go"
   onClick="history.go('home.netscape.com')"&gt
</PRE>
<P>The following button navigates to the URL that is three entries backward in the history list:
<PRE>
&ltP&gt&ltINPUT TYPE="button" VALUE="Go"
   onClick="history.go(-3)"&gt
</PRE>

<H3>相关</H3>
<LI><A HREF="ref_a-c.htm#back_method" back_method">back</A>, <A HREF="ref_f-g.htm#forward_method" forward_method">forward</A> methods
<!------------------------------------------------------------------------------------------------>
<HR>

<SCRIPT>
document.write("<FONT SIZE=-2>Last modified " + document.lastModified)
</SCRIPT>
<P>
</BODY>
<htm>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -