日期:2014-05-16  浏览次数:20355 次

有木有JavaScript高手敢进来
小弟琢磨这个特效很久了、在IE内核的浏览器图片就显示,而且点击大图也可以点击进去,唯独火狐、苹果、谷歌浏览器就不显示图片,而且点击图片就会显示对象为空,希望高手帮修改一下兼容问题,小弟对JavaScript一窍不通.....能帮得上忙的就帮帮一下、小弟感激不尽!进来看了不能帮得上忙的,在此也谢过了!
我觉得问题出现在“$”这个符号,但是不知道怎么改。。。
以下是代码:
 <table width="790" border="0" align="center" cellpadding="0" cellspacing="5">
  <tr>
  <td colspan="2" align="left" class="txt_1"></td>
  </tr>
  <tr>
  <td width="520" align="center"><img src="images/1.jpg" width="520" height="410" border="0" id="main_img" rel="#" link="#" /></td>
  <td width="110" align="center" valign="top">
  <img src="images/gotop.gif" width="100" height="14" id="gotop" />
  <div id="showArea">
<img src="images/01.jpg" width="80" height="50" border="0" class="thumb_img" rel="images/01.jpg" link=" #" />
  <img src="images/02.jpg" width="80" height="50" border="0" class="thumb_img" rel="images/02.jpg" link="#" />
  <img src="images/03.jpg" width="80" height="50" border="0" class="thumb_img" rel="images/03.jpg" link="#" />
  <img src="images/01.jpg" width="80" height="50" border="0" class="thumb_img" rel="images/01.jpg" link="#" />
  <img src="images/02.jpg" width="80" height="50" border="0" class="thumb_img" rel="images/02.jpg" link="#" />
  <img src="images/02.jpg" width="80" height="50" border="0" class="thumb_img" rel="images/03.jpg" link="#" />
  <img src="images/01.jpg" width="80" height="50" border="0" class="thumb_img" rel="images/01.jpg" link="#" />
  <img src="images/02.jpg" width="80" height="50" border="0" class="thumb_img" rel="images/02.jpg" link="#" />
  <img src="images/03.jpg" width="80" height="50" border="0" class="thumb_img" rel="images/03.jpg" link="#" />
  <img src="images/01.jpg" width="80" height="50" border="0" class="thumb_img" rel="images/01.jpg" link="#" />
  <img src="images/02.jpg" width="80" height="50" border="0" class="thumb_img" rel="images/02.jpg" link="#" />
  <img src="images/03.jpg" width="80" height="50" border="0" class="thumb_img" rel="images/03.jpg" link="#" />
  <img src="images/gobottom.gif" width="100" height="14" id="gobottom" /></td>
  </tr>
  </table>
<script language="javascript" type="text/javascript">
function $(e) {return document.getElementById(e);}
document.getElementsByClassName = function(cl) {
  var retnode = [];
  var myclass = new RegExp('\\b'+cl+'\\b');
  var elem = this.getElementsByTagName('*');
  for (var i = 0; i < el