1
<div id="theimages">
<!-- DO NOT CHANGE ANYTHING AFTER THIS LINE -->
<a id="a1" href="http://www.auctionittoday.com/flashshow/image/1001A.jpg" border= "0" ><img src="http://www.auctionittoday.com/flashshow/image/1001A.jpg" width="128" border="0" alt="Click on Image to enlarge"><BR><font face="Veranda" point-size="8/9pt">Click on Image to enlarge</font><br></a><BR> <a href="http://www.auctionittoday.com/flashshow/image/1001B.jpg"border= "0"><img src="http://www.auctionittoday.com/flashshow/image/1001B.jpg" width="128" border="0" alt="Click on Image to enlarge"><BR><font face="Veranda" point-size="8/9pt">Click on Image to enlarge</font><br></a><BR> <a href="http://www.auctionittoday.com/flashshow/image/1001C.jpg"border= "0"><img src="http://www.auctionittoday.com/flashshow/image/1001C.jpg" width="128" border="0" alt="Click on Image to enlarge"><BR><font face="Veranda" point-size="8/9pt">Click on Image to enlarge</font><br></a><BR> <a href="http://www.auctionittoday.com/flashshow/image/1001D.jpg"border= "0"><img src="http://www.auctionittoday.com/flashshow/image/1001D.jpg" width="128" border="0" alt="Click on Image to enlarge"><BR>
<font face="Veranda" point-size="8/9pt">Click on Image to enlarge</font><br></a><BR>
<a href="http://www.auctionittoday.com/flashshow/image/1001E.jpg"border= "0"><img src="http://www.auctionittoday.com/flashshow/image/1001E.jpg" width="128" border="0" alt="Click on Image to enlarge"><BR><font face="Veranda" point-size="8/9pt">Click on Image to enlarge</font><br></a><BR>
<!-- DO NOT CHANGE ANYTHING BEFORE THIS LINE -->
</div>
<script>
alert(document.all.a1.href);//或者alert(document.all.theimages.childNodes[0].href);
</script>
<div id="theimages">
<!-- DO NOT CHANGE ANYTHING AFTER THIS LINE -->
<a id="a1" href="http://www.auctionittoday.com/flashshow/image/1001A.jpg" border= "0" ><img src="http://www.auctionittoday.com/flashshow/image/1001A.jpg" width="128" border="0" alt="Click on Image to enlarge"><BR><font face="Veranda" point-size="8/9pt">Click on Image to enlarge</font><br></a><BR> <a href="http://www.auctionittoday.com/flashshow/image/1001B.jpg"border= "0"><img src="http://www.auctionittoday.com/flashshow/image/1001B.jpg" width="128" border="0" alt="Click on Image to enlarge"><BR><font face="Veranda" point-size="8/9pt">Click on Image to enlarge</font><br></a><BR> <a href="http://www.auctionittoday.com/flashshow/image/1001C.jpg"border= "0"><img src="http://www.auctionittoday.com/flashshow/image/1001C.jpg" width="128" border="0" alt="Click on Image to enlarge"><BR><font face="Veranda" point-size="8/9pt">Click on Image to enlarge</font><br></a><BR> <a href="http://www.auctionittoday.com/flashshow/image/1001D.jpg"border= "0"><img src="http://www.auctionittoday.com/flashshow/image/1001D.jpg" width="128" border="0" alt="Click on Image to enlarge"><BR>
<font face="Veranda" point-size="8/9pt">Click on Image to enlarge</font><br></a><BR>
<a href="http://www.auctionittoday.com/flashshow/image/1001E.jpg"border= "0"><img src="http://www.auctionittoday.com/flashshow/image/1001E.jpg" width="128" border="0" alt="Click on Image to enlarge"><BR><font face="Veranda" point-size="8/9pt">Click on Image to enlarge</font><br></a><BR>
<!-- DO NOT CHANGE ANYTHING BEFORE THIS LINE -->
</div>
<script>
alert(document.all.a1.href);//或者alert(document.all.theimages.childNodes[0].href);
</script>
<a id="a1" href="http://www.auctionittoday.com/flashshow/image/1001A.jpg" border= "0" onclick="alert('sdf') ;return false">
<!-- DO NOT CHANGE ANYTHING AFTER THIS LINE -->和
<!-- DO NOT CHANGE ANYTHING BEFORE THIS LINE -->之间的内容,不过还谢谢拉alert(document.all.a1.href);这个就不能用了alert(document.all.theimages.childNodes[0].href);这个在IE中可以,但在火狐中是undefined
==>
alert(document.getElementById("a1").href);
http://blog.csdn.net/datehr/category/198305.aspx