Non-standard
Summary
Causes a string to be displayed in fixed-pitch font as if it were in a TT tag.
Method of String |
|
|---|---|
| Implemented in | JavaScript 1.0 |
| ECMAScript Edition | none |
Syntax
string.fixed()
Parameters
None.
Description
Use the fixed method with the write or writeln methods to format and display a string in a document. In server-side JavaScript, use the write function to display the string.
Examples
The following example uses the fixed method to change the formatting of a string:
var worldString = "Hello, world"; document.write( worldString.fixed() );
This example produces the same output as the following HTML:
<TT>Hello, world</TT>
Mozilla Developer Network