简单教程
提交运行
代码编辑器:
<html><!DOCTYPE html> <html> <body> <p>This example works in Firefox only.</p> <script> var employees= <employees> <person> <name>Tove</name> <age>32</age> </person> <person> <name>Jani</name> <age>26</age> </person> </employees>; document.write(employees.person.(name == "Tove").age); </script> </body> </html>
运行结果: