此方法使字符串显示为粗体,就好像它在<b>标签中一样。
string.bold( )
返回带有<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>
运行上面代码输出
链接:https://www.learnfk.comhttps://www.learnfk.com/javascript/string-bold.html
来源:LearnFk无涯教程网
<b>Hello world</b>
祝学习愉快!(内容编辑有误?请选中要编辑内容 -> 右键 -> 修改 -> 提交!)
Python实战 · 从0到1搭建直播视频平台 -〔Barry〕