JavaScript中的fontsize()方法使用详解
此方法会导致就好像它是在一个<fontsize="size">标记的字符串显示在规定的大小
语法
string.fontsize(size)
下面是参数的详细信息:
- color:1和7之间的整数,代表1和7之间的有符号整数的字符串
返回值:
- 返回字符串<fontsize="size">标签
例子:
<html>
<head>
<title>JavaScriptStringfontsize()Method</title>
</head>
<body>
<scripttype="text/javascript">
varstr=newString("Helloworld");
alert(str.fontsize(3));
</script>
</body>
</html>
这将产生以下结果:
<fontsize="3">Helloworld</font>