parent property
the parent property is a synonym for a window or frame whose frameset contains the current frame.
语法
1. parent.propertyname 2. parent.methodname 3. parent.framename 4. parent.frames[index]
propertyname is the defaultstatus, status, length, name, or parent property when the calling parent refers to a window object.
propertyname is the length, name, or parent property when the calling parent refers to a frame object.
methodname is any method associated with the window object.
framename and frames[index] are ways to refer to frames.
property of
description
the parent property refers to the <frameset> window of a frame. child frames within a frameset refer to sibling frames by using "parent" in place of the window name as follows: parent.framename or parent.frames[index]. for example, if the fourth frame in a set has name="homeframe", sibling frames can refer to that frame using parent.homeframe or parent.frames[3].
you can use parent.parent to refer to the "grandparent" frame or window when a <frameset> tag is nested within a child frame.
the parent property is read-only. the value of the parent property is
<object nameattribute>where nameattribute is the name attribute if the parent is a frame, or an internal reference if the parent is a window.
例子
see the 例子 for the frame object.
parse method
returns the number of milliseconds in a date string since january 1, 1970 00:00:00, local time.
语法
date.parse(datestring)datestring is a string representing a date or a property of an existing object.
method of
description
the parse method takes a date string (such as "dec 25, 1995"), and returns the number of milliseconds since january 1, 1970 00:00:00 (local time). this function is useful for setting date values based on string values, for example in conjunction with the settime method and the date object.
given a string representing a time, parse returns the time value. it accepts the ietf standard date 语法: "mon, 25 dec 1995 13:30:00 gmt". it understands the continental us time zone abbreviations, but for general use, use a time zone offset, for example "mon, 25 dec 1995 13:30:00 gmt+0430" (4 hours, 30 minutes west of the greenwich meridian). if you do not specify a time zone, the local time zone is assumed. gmt and utc are considered equivalent.
because the parse function is a static method of date, you always use it as date.parse(), rather than as a method of a date object you created.
例子
if ipodate is an existing date object, then
ipodate.settime(date.parse("aug 9, 1995"))
相关
parsefloat function
parses a string argument and returns a floating point number.
语法
parsefloat(string)
string is a string that represents the value you want to parse.
description
the parsefloat function is a built-in javascript function. it is not a method associated with any object, but is part of the language itself.
parsefloat parses its argument, a string, and returns a floating point number. if it encounters a character other than a sign ( + or -), numeral (0-9), a decimal point, or an exponent, then it returns the value up to that point and ignores that character and all succeeding characters.
if the first character cannot be converted to a number, parsefloat returns one of the following values: