JavaScript中的bold()方法使用详解
此方法将导致就好像它是在一个<b>标签的字符串显示为粗体。
语法
string.bold()
下面是参数的详细信息:
- NA:
返回值:
- 返回字符串含有<b>标签
例子:
<html>
<head>
<title>JavaScriptStringbold()Method</title>
</head>
<body>
<scripttype="text/javascript">
varstr=newString("Helloworld");
alert(str.bold());
</script>
</body>
</html>
这将产生以下结果:
<b>Helloworld</b>