| fixed() The fixed method is used to convert the contents of the stringName (see syntax) to a monospaced font. The text is enclosed within the opening and closing HTML tags, which indicates that the contents will be displayed in a monospace or "True Type" font. The default monospace font the text will be displayed in is defined by the browser. syntax: stringName.fixed() EXAMPLE var textString = new String("This is the string text."); document.write(textString.fixed() ) The example shows the creation of a new string object called textString. The string of text is then written to the screen by a document.write statement which invokes the fixed() method. The text is displayed in the default monspace font for the browser. |