Latest web development tutorials

JavaScript fixed () method

String Object Reference JavaScript String Object

Definition and Usage

fixed () method for the string appears as typewriter font.

This method returns a string plus <tt> tag, as follows:

<Tt> string </ tt>

grammar

string.fixed()


Browser Support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support fixed () method.


Examples

Examples

Typewriter text to display the string:

<script>

var str = "Hello world!";
document.write(str.fixed());

</script>

try it"


String Object Reference JavaScript String Object