Client-Side Java Script Reference.pdf

(6603 KB) Pobierz
7491389 UNPDF
merchant system
World Wide Web
security
Chat
server
navigator
community system
TCP/IP
HTML
Publishing
Personal
Client-Side JavaScript
Reference
Inter
ww
Proxy
SSL
Version 1.3
Mozilla
Publishing
IStore
Internet
http://www
secure sockets layer
mail
encryption
JavaScript
comp.sys
electronic commerce
news
certificate
directory server
Proxy
URL
HTML
7491389.001.png
Netscape Communications Corporation ("Netscape") and its licensors retain all ownership rights to the software programs
offered by Netscape (referred to herein as "Software") and related documentation. Use of the Software and related
documentation is governed by the license agreement accompanying the Software and applicable copyright law.
Your right to copy this documentation is limited by copyright law. Making unauthorized copies, adaptations, or compilation
works is prohibited and constitutes a punishable violation of the law. Netscape may revise this documentation from time to
time without notice.
THIS DOCUMENTATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. IN NO EVENT SHALL NETSCAPE BE
LIABLE FOR INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY KIND ARISING FROM ANY
ERROR IN THIS DOCUMENTATION, INCLUDING WITHOUT LIMITATION ANY LOSS OR INTERRUPTION OF BUSINESS,
PROFITS, USE, OR DATA.
The Software and documentation are copyright ©1994-1999 Netscape Communications Corporation. All rights reserved.
Netscape, Netscape Navigator, Netscape Certificate Server, Netscape DevEdge, Netscape FastTrack Server, Netscape ONE,
SuiteSpot and the Netscape N and Ship’s Wheel logos are registered trademarks of Netscape Communications Corporation in
the United States and other countries. Other Netscape logos, product names, and service names are also trademarks of
Netscape Communications Corporation, which may be registered in other countries. JavaScript is a trademark of Sun
Microsystems, Inc. used under license for technology invented and implemented by Netscape Communications Corporation.
Other product and brand names are trademarks of their respective owners.
The downloading, exporting, or reexporting of Netscape software or any underlying information or technology must be in
full compliance with all United States and other applicable laws and regulations. Any provision of Netscape software or
documentation to the U.S. Government is with restricted rights as described in the license agreement accompanying Netscape
software.
Recycled and Recyclable Paper
Version 1.3
©1999 Netscape Communications Corporation. All Rights Reserved
Printed in the United States of America. 00 99 98 5 4 3 2 1
Netscape Communications Corporation, 501 East Middlefield Road, Mountain View, CA 94043
7491389.002.png 7491389.003.png
New Features in this Release
JavaScript version 1.3 provides the following new features and enhancements:
ECMA compliance. JavaScript 1.3 is fully compatible with ECMA-262. See
the Client-Side JavaScript Guide for details.
Unicode support. The Unicode character set can be used for all known
encoding, and you can use the Unicode escape sequence in string literals.
See escape and unescape . See the Client-Side JavaScript Guide for
details.
• Changes to the Array object.
• When you specify a single numeric parameter with the Array
constructor, you specify the initial length of the array.
•The push method returns the new length of the array rather than the last
element added to the array.
•The splice method always returns an array containing the removed
elements, even if only one element is removed.
•The toString method joins an array and returns a string containing
each array element separated by commas, rather than returning a string
representing the source code of the array.
•The length property contains an unsigned, 32-bit integer with a value
less than 2 32 .
3
• Changes to the Date object.
• Removed platform dependencies to provide a uniform behavior across
platforms.
• Changed the range for dates to -100,000,000 days to 100,000,000 days
relative to 01 January, 1970 UTC.
• Added a milliseconds parameter to the Date constructor.
• Added the getFullYear , setFullYear , getMilliseconds , and
setMilliseconds methods.
• Added the getUTCDate , getUTCDay , getUTCFullYear ,
getUTCHours , getUTCMilliseconds , getUTCMinutes ,
getUTCMonth , getUTCSeconds , setUTCDate , setUTCFullYear ,
setUTCHours , setUTCMilliseconds , setUTCMinutes ,
setUTCMonth , setUTCSeconds , and toUTCString methods.
• Added a day parameter to the setMonth method.
• Added minutes, seconds, and milliseconds parameters to the setHours
method.
• Added seconds and milliseconds parameters to the setMinutes
method.
• Added a milliseconds parameter to the setSeconds method.
• Added a milliseconds parameter to the UTC method.
• Deprecated the getYear , setYear , and toGMTString methods.
• Changes to the Function object.
• Added the apply method, which allows you to apply a method of
another object in the context of a different object (the calling object).
• Added the call method, which allows you to call (execute) a method
of another object in the context of a different object (the calling object).
• Deprecated the arguments.caller property.
4 Client-Side JavaScript Reference
• Changes to the String object.
• The charCodeAt and fromCharCode methods use Unicode values
rather than ISO-Latin-1 values.
• The replace method supports the nesting of a function in place of the
second argument.
New method toSource. The toSource method returns a string
representing the source code of the object. See Array.toSource ,
Boolean.toSource , Date.toSource , Function.toSource ,
Number.toSource , Object.toSource , RegExp.toSource , and
String.toSource .
New top-level properties Infinity, NaN, and undefined. Infinity is a
numeric value representing infinity. NaN is a value representing Not-A-
Number. undefined is the value undefined.
New top-level function isFinite. isFinite evaluates an argument to
determine whether it is a finite number.
Changes to the top-level eval function. You should not indirectly use the
eval function by invoking it via a name other than eval .
New strict equality operators === and !==. The === (strict equal)
operator returns true if the operands are equal and of the same type. The
!== (strict not equal) operator returns true if the operands are not equal
and/or not of the same type. See “Comparison Operators” on page 635 and
“Using the Equality Operators” on page 637.
Changes to the equality operators == and !=. The use of the == (equal)
and != (not equal) operators reverts to the JavaScript 1.1 implementation. If
the two operands are not of the same type, JavaScript attempts to convert
the operands to an appropriate type for the comparison. See “Using the
Equality Operators” on page 637.
5
Zgłoś jeśli naruszono regulamin