页面里放置一个绝对定位的 iframe 来加载相应的图片

解决方案 »

  1.   

    <script language="javascript">
    function viewPic(str){
       
       document.all("lab2").innerHTML="<img src='d:/img/beachball.jpg'>";
    }
    </script><label id=lab1 onmouseover=viewPic("on") style="cursor:hand">浏览图片</label><table border="0" width="30%" id="table1">
     <tr>
       <td><label id=lab2></label></td>
     </tr>
    </table>
      

  2.   

    刚才审题不透,完整的代码:
    <html><head>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
    <title>新建网页 1</title>
    <script language="javascript">
    function viewPic(str)
    {
       document.all("lab2").innerHTML="<img src='d:/img/beachball.jpg'>";
    }
    function f()
    {
       document.all("lab2").innerHTML="";
    }
    </script>
    </head><body>
    <label id=lab1 onmouseover=viewPic() onmouseout=f() style="cursor:hand">浏览图片</label><table border="0" width="30%" id="table1">
    <tr>
    <td><label id=lab2></label>
     </td>
    </tr>
    </table></body></html>
      

  3.   

    <TABLE width='100%' border='1' align='center' height='' + Integer.toString(rowHeight) + '' 
           cellpadding='0' cellspacing='0' bordercolordark='#FFFFFF' bordercolorlight='#999999'>
    <TR>
    <TD align='center' height=24 bgcolor='#6793F9' width='5%'><font color='white'>选择</font></TD>
    <TD align='center' height=24 bgcolor='#6793F9' width='6%'><font color='white'>姓名</font></TD>
    <TD align='center' height=24 bgcolor='#6793F9' width='10%'><font color='white'>证书名称</font></TD>
    <TD align='center' height=24 bgcolor='#6793F9' width='6%'><font color='white'>证书类型</font></TD>
    <TD align='center' height=24 bgcolor='#6793F9' width='16%'><font color='white'>备注</font></TD>
    <TD align='center' height=24 bgcolor='#6793F9' width='10%'><font color='white'>查看证书</font></TD>
    <TD align='center' height=24 bgcolor='#6793F9' width='10%'><font color='white'>修改</font></TD>
    </TR>
    <logic:iterate id="certList" name="certList" scope="request">
    <tr bgcolor=''>
    <td align='left' height=20 width='5%'>&nbsp;             
        &nbsp;<input name="CHK" type="checkbox" value='<bean:write name="certList" property="numid" />' >
    </td>
    <td align='center' height=20 width='6%'>&nbsp;<bean:write name="certList" property="userid" /></td>
    <td align='center' height=20 width='10%'>&nbsp;<bean:write name="certList" property="zsname" /></td>
    <td align='center' height=20 width='6%'>&nbsp;<bean:write name="certList" property="zstype" /></td>
    <td align='center' height=20 width='16%'>&nbsp;<bean:write name="certList" property="memo"  /></td>
        <td align='center' height=20 width='10%'>&nbsp;<a href='#' onclick='showViewWindows(<bean:write name="certList" property="numid"  />,"600","500")'>查看证书</a></td>
        <td align='center' height=20 width='7%'>&nbsp;<a href='#' onclick='showUpdateWindows(<bean:write name="certList" property="numid"  />,"800","350")'>修改</a></td>
    </tr>
    </logic:iterate>
    </TABLE>鼠标移动到查看证书上面,就可以看见图片,移开就消失
      

  4.   

    楼上的果真都是高手,连源代码都贴出来了,其实原理很简单,就是处理一个鼠标的onmouseover和onmouseout事件。设计一个层(div),在onmouseover中让这个层显示,并在其中更新显示你要的HTML代码。然后在onmouseout中隐藏这个层。