Javascript String.bold()方法
作者:--
发布时间:2019-11-20
评论:0
阅读:0
此方法将导致就好像它是在一个<b>标签的字符串显示为粗体。
语法
string.bold( )
下面是参数的详细信息:
返回值:
例子:
<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>
这将产生以下结果:
<b>hello world</b>