| http://www.sqlsky.com/ |
|
|
The parent property is a synonym for a window or frame whose frameset contains the current frame.
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.
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.
Returns the number of milliseconds in a date string since January 1, 1970 00:00:00, local time.
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"))
Parses a string argument and returns a floating point number.
string is a string that represents the value you want to parse.
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:
For arithmetic purposes, the "NaN" value is not a number in any radix. You can call the isNaN function to determine if the result of parseFloat is "NaN". If "NaN" is passed on to arithmetic operations, the operation results will also be "NaN".
The following 例子 all return 3.14: parseFloat("3.14") parseFloat("314e-2") parseFloat("0.0314E+2") var x = "3.14" parseFloat(x)
The following example returns "NaN" or 0: parseFloat("FF2")
Parses a string argument and returns an integer of the specified radix or base.
string is a string that represents the value you want to parse.
radix is an integer that represents the radix of the return value.
The parseInt function is a built-in JavaScript function. It is not a method associated with any object, but is part of the language itself.
The parseInt function parses its first argument, a string, and attempts to return an integer of the specified radix (base). For example, a radix of 10 indicates to convert to a decimal number, 8 octal, 16 hexadecimal, and so on. For radixes above 10, the letters of the alphabet indicate numerals greater than 9. For example, for hexadecimal numbers (base 16), A through F are used.
If parseInt encounters a character that is not a numeral in the specified radix, it ignores it and all succeeding characters and returns the integer value parsed up to that point. ParseInt truncates numbers to integer values.
If the radix is not specified or is specified as 0, JavaScript assumes the following:
If the first character cannot be converted to a number, parseFloat returns one of the following values:
For arithmetic purposes, the "NaN" value is not a number in any radix. You can call the isNaN function to determine if the result of parseInt is "NaN". If "NaN" is passed on to arithmetic operations, the operation results will also be "NaN".
The following 例子 all return 15: parseInt("F", 16) parseInt("17", 8) parseInt("15", 10) parseInt(15.99, 10) parseInt("FXX123", 16) parseInt("1111", 2) parseInt("15*3", 10)
The following 例子 all return "NaN" or 0: parseInt("Hello", 8) parseInt("0x7", 10) parseInt("FFF", 10)
Even though the radix is specified differently, the following 例子 all return 17 because the input string begins with "0x". parseInt("0x11", 16) parseInt("0x11", 0) parseInt("0x11")
A text field on an htm form that conceals its value by displaying asterisks (*). When the user enters text into the field, asterisks (*) hide anything entered from view.
To define a password object, use standard htm 语法: <INPUT
TYPE="password"
NAME="passwordName"
[VALUE="textValue"]
SIZE=integer>
NAME="passwordName" specifies the name of the password object. You can access this value using the name property.
VALUE="textValue" specifies the initial value of the password object. You can access this value using the defaultValue property.
SIZE=integer specifies the number of characters the password object can accommodate without scrolling.
To use a password object´s properties and methods: 1. passwordName.propertyName
2. passwordName.methodName(parameters)
3. formName.elements[index].propertyName
4. formName.elements[index].methodName(parameters)
passwordName is the value of the NAME attribute of a password object.
formName is either the value of the NAME attribute of a form object or an element in the forms array.
index is an integer representing a password object on a form.
propertyName is one of the properties listed below.
methodName is one of the methods listed below.
A password object on a form looks as follows:
A password object is a form element and must be defined within a <FORM> tag.
A string specifying the url-path portion of the URL.
index is an integer representing a link object.
The pathname property specifies a portion of the URL. The pathname supplies the details of how the specified resource can be accessed.
You can set the pathname property at any time, although it is safer to set the href property to change a location. If the pathname that you specify cannot be found in the current location, you will get an error.
See Section 3.1 of RFC 1738 for complete information about the pathname.
See the 例子 for the href property.
The ratio of the circumference of a circle to its diameter, approximately 3.14159.
Because PI is a constant, it is a read-only property of Math.
The following example displays the value of pi: document.write("The value of pi is " + Math.PI)
A string specifying the communications port that the server uses for communications.
index is an integer representing a link object.
The port property specifies a portion of the URL. The port property is a substring of the host property. The host property is the concatenation of the hostname and port properties, separated by a colon. When the port property is not defined, the host property is the same as the hostname property.
You can set the port property at any time, although it is safer to set the href property to change a location. If the port that you specify cannot be found in the current location, you will get an error. If the port property is not specified, it defaults to 80 on the server.
See Section 3.1 of RFC 1738 for complete information about the port.
See the 例子 for the href property.
Returns base to the exponent power, that is, baseexponent.
Displays a Prompt dialog box with a message and an input field.
Use the prompt method to display a dialog box that receives user input. If you do not specify an initial value for inputDefault, the dialog box displays the value <undefined>.
Although prompt is a method of the window object, you do not need to specify a windowReference when you call it. For example, windowReference.prompt() is unnecessary.
A string specifying the beginning of the URL, up to and including the first colon.
index is an integer representing a link object.
The protocol property specifies a portion of the URL. The protocol indicates the access method of the URL. For example, a protocol of "http:" specifies Hypertext Transfer Protocol, and a protocol of "javascript:" specifies JavaScript code.
You can set the protocol property at any time, although it is safer to set the href property to change a location. If the protocol that you specify cannot be found in the current location, you will get an error.
The protocol property represents the scheme name of the URL. See Section 2.1 of RFC 1738 for complete information about the protocol.
See the 例子 for the href property.