js 中 getElementsByTagName 的用法
<html> <body> <img id="compman" src="compman.gif" alt="Computerman" /> <br /> <script type="text/javascript"> x=document.getElementsByTagName('img')[0]; document.write("Image id: " + x.id ); document.write("<br />"); document.write("An alternate way: "); document.write(document.getElementById('compman').id ); </script> </body> </html>
相关推荐
Element张冰 2019-06-30
element雨幕 2011-05-04
娇喘地白菜 2014-09-25
水荷 2012-08-28
GUAOSHITAIDU 2012-04-26
GUAOSHITAIDU 2011-07-12
ElementW 2011-04-13
zgjxyszh 2014-05-16
ELEMENTS爱乐小超 2017-03-01
TwentySeventh 2019-05-08
allentony 2015-03-12
月月鸟个人 2007-01-19