此方法将导致就好像它是在一个<b>标签的字符串显示为粗体。
语法
下面是参数的详细信息:
返回值:
例子:
<html>
<head>
<title>JavaScript String bold() Method</title>
</head>
<body>
<script type="text/javascript">
var str = new String("Hello world");
alert(str.bold());
</script>
</body>
</html>
这将产生以下结果: