Java Reference
In-Depth Information
Function
Introduced
Description
encodeURIComponent()
JavaScript 1.5
Used to compose a new version of a complete
URI by replacing each instance of the specifi ed
character with escape sequences. Representation
is via the UTF encoding of the characters.
escape()
JavaScript 1.0
Used to encode a string in the ISO Latin-1 char-
acter set; for example, to add to a URL.
eval()
JavaScript 1.0
Returns the result of the JavaScript code, which
is passed in as a string parameter.
isFinite()
JavaScript 1.3
Indicates whether the argument is a fi nite number.
isNaN()
JavaScript 1.1
Indicates if the argument is not a number.
Number()
JavaScript 1.2
Converts an object to a number.
parseFloat()
JavaScript 1.0
Parses a string and returns it as a fl oating-point
number.
parseInt()
JavaScript 1.0
Parses a string and returns it as an integer. An
optional second parameter specifi es the base of
the number to be converted.
String()
JavaScript 1.2
Converts an object to a string.
unescape()
JavaScript 1.0
Returns the ASCII string for the specifi ed hexa-
decimal encoding value.
JavaScript and Jscript Core Objects
This section describes the objects available in the JavaScript and Jscript core languages and their meth-
ods and properties.
ActiveXObject
The ActiveXObject object represents an ActiveX object when accessed from within Microsoft's
JScript code. Introduced in Jscript 3.0, it's not available in ECMAScript or JavaScript. It is created with
the ActiveXObject constructor; for example, to create a Microsoft Word document, you would write
var objActiveX = new ActiveXObject(“Word.Document”);
The properties and methods of this object will be those of the ActiveX object thus created. For example,
the following code opens a Word document and writes some text to it and to the HTML page:
var objActiveX = new ActiveXObject(“Word.Document”);
strText=”This is being written both to the HTML page and to the Word document.”;
objActiveX.application.selection.typeText(strText);
document.write(strText);
Search WWH ::




Custom Search