JavaScript fixed() 方法


定义和用法

fixed() 方法用于把字符串显示为打字机字体。

语法
  1. stringObject.fixed()

实例

在本例中,"Hello world!" 将被显示为打字机文本:

  1. <html>
  2. <body>
  3. <script type="text/javascript">
  4. var str="Hello world!"
  5. document.write(str.fixed())
  6. </script>
  7. </body>
  8. </html>

分类导航