javascript 打印输出 object

<!DOCTYPE html PUBliC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="zh-CN">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<script type="application/javascript" src="jquery.js"></script>
<title>企业培训,it培训,数据库培训,android培训,嵌入式培训</title>
</head>
<body>
<div>http://www.miiceic.org.cn企业培训</div>
<div>http://www.amboedu.com学历教育</div>
<div>http://www.ciitn.com</div>
<div>http://www.miiceic.org.cn/amt2011技术峰会</div>
</body>
</html>
<script language="javascript">
    $(document).ready(function() {
          var r="";
          var t = $("div:contains('miiceic')");
          var l=t.length;
          for(i=0;i<l;i++){
              r = r + t.get(i).tagName+":"+t.get(i).textContent + "\r\n";
          }
          alert(r);
        });
</script>

posted @ 2011-09-20 11:25  通海口  阅读(480)  评论(0编辑  收藏  举报