Javascript String.toString()方法
作者:--
发布时间:2019-11-20
评论:0
阅读:1
此方法返回表示指定对象的字符串形式。
语法
string.tostring( )
下面是参数的详细信息:
返回值:
例子:
<html>
<head>
<title>javascript string tostring() method</title>
</head>
<body>
<script type="text/javascript">
var str = "apples are round, and apples are juicy.";
document.write(str.tostring( ));
</script>
</body>
</html>
这将产生以下结果:
apples are round, and apples are juicy.