这种方法会导致字符串显示为上标,就好像它是在一个<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>
本文地址:https://www.stayed.cn/item/14958
转载请注明出处。
本站部分内容来源于网络,如侵犯到您的权益,请 联系我