Javascript String.sup()方法
作者:--
发布时间:2019-11-20
评论:0
阅读:2
这种方法会导致字符串显示为上标,就好像它是在一个<sup>标记。
语法
string.sup( )
下面是参数的详细信息:
返回值:
例子:
<html>
<head>
<title>javascript string sup() method</title>
</head>
<body>
<script type="text/javascript">
var str = new string("hello world");
alert(str.sup());
</script>
</body>
</html>
这将产生以下结果:
<sup>hello world</sup>