此方法返回表示指定对象的字符串。
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>
运行上面代码输出
链接:https://www.learnfk.comhttps://www.learnfk.com/javascript/string-tostring.html
来源:LearnFk无涯教程网
Apples are round, and Apples are Juicy.
祝学习愉快!(内容编辑有误?请选中要编辑内容 -> 右键 -> 修改 -> 提交!)