W3School TIY Editor
W3School 在线教程
改变方向
暗黑模式
运行代码
<!DOCTYPE html> <html> <body> <h1>使用 <em>space</em> 参数</h1> <p>为每个空格插入单词 “SPACE”:</p> <pre id="demo"></pre> <script> var obj = { "name":"Bill", "age":"19", "city":"Seattle"}; var text = JSON.stringify(obj, null, "SPACE"); document.getElementById("demo").innerHTML = text; </script> </body> </html>