日期:2014-05-17 浏览次数:20799 次
<!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"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>无标题文档</title> </head> <body> <div id="demo"> <img src="http://c.csdn.net/bbs/t/5/i/pic_logo.gif" /> <img src="http://images.csdn.net/20120528/程序员6月封面_副本_副本.jpg" /> </div> <button onclick="window.open('2.html');">OPEN</button> <script type="text/javascript"> var obj = document.getElementById('demo').getElementsByTagName('img'), ar = []; for (var i = 0; i < obj.length; i ++) ar.push(obj[i]); </script> </body> </html>