Javascript String.fixed()方法
作者:--
发布时间:2019-11-20
评论:0
阅读:0
此方法会导致就好像它是在一个<tt>的标签被显示在固定间距的字体的字符串。
语法
string.fixed( )
下面是参数的详细信息:
返回值:
例子:
<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>