bold() 方法用于把字符串显示为粗体。
stringObject.bold()
在本例中,"Hello world!" 将被显示为粗体:
<html><body><script type="text/javascript">var str="Hello world!"document.write(str.bold())</script></body></html>
<html>
<body>
<script type="text/javascript">
var str="Hello world!"
document.write(str.bold())
</script>
</body>
</html>