此方法會導致就好像它是在一個<tt>的標籤被顯示在固定間距的字體的字串。
語法
string.fixed( )
下麵是參數的詳細資訊:
-
NA
返回值:
-
返回字串的<tt>標籤
例子:
<html>
<head>
<title>JavaScript String fixed() Method</title>
</head>
<body>
<script type="text/javascript">
var str = new String("Hello world");
alert(str.fixed());
</script>
</body>
</html>
這將產生以下結果:
<tt>Hello world</tt>
