html中的dom对象 dom中的关键是Object(对象),在dom的概念中,html或者xml的文档是由各种各样的对象组成,这些对象之间以一种树结构关联起来 在html dom 中,对象分为以下几种: anchordocumenteventform and form inputframe frameset iframeimagelocationnavigatoroption and selectscreentable tableheader tablerow tabledatawindow Example: 取得页面中连接的个数 <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>get all links</title> </head> <body> <table> <tr> <td><a href="http://google.com">google</a></td> </tr> <tr> <td><a href="http://baidu.com">baidu</a></td> </tr> </table> <a href="javascript:void(0)" onclick="myFunction()">开始统计超链接的个数</a> <script> function myFunction(){ alert(document.links.length); } </script> </body> </html>