W3School TIY
编辑您的代码:
<html> <body> <script type="text/javascript"> personObj=new Object() personObj.firstname="John" personObj.lastname="Adams" personObj.age=35 personObj.eyecolor="black" document.write(personObj.firstname + " 的年龄是 " + personObj.age + " 岁。") </script> </body> </html>
查看结果: