简介JavaScript中fixed()方法的使用
此方法会导致就好像它是在一个<tt>的标签被显示在固定间距的字体的字符串。
语法
string.fixed()
下面是参数的详细信息:
- NA
返回值:
- 返回字符串的<tt>标签
例子:
<html>
<head>
<title>JavaScriptStringfixed()Method</title>
</head>
<body>
<scripttype="text/javascript">
varstr=newString("Helloworld");
alert(str.fixed());
</script>
</body>
</html>
这将产生以下结果:
<tt>Helloworld</tt>