JavaScript bold() 方法

定义和用法
bold() 方法用于把字符串显示为粗体。
该方法返回加了 <b> 标签的字符串, 如下所示:
<b>string</b>
语法
string.bold()
浏览器支持
所有主要浏览器都支持 bold() 方法。
实例
实例
使用粗体显示字符串:
<script>
var str = "Hello world!";
document.write(str.bold());
</script>
var str = "Hello world!";
document.write(str.bold());
</script>
