感觉不用写script吧
直接<a href="大图" targer=_new><img src="小图" border="0"></a>写脚本的话也就是加个onclick 把img.src换成大图位置?

解决方案 »

  1.   

    你可以把按键改成你要的链接
    <script language="javascript" type="text/javascript">

    function enlarge(id)
    {
    var node = document.getElementById(id);
    var width = node.getAttribute("width");
    var height = node.getAttribute("height");
    node.setAttribute("width",width+10);
    node.setAttribute("height",height+10);
    } function shrink(id)
    {
    var node = document.getElementById(id);
    var width = node.getAttribute("width");
    var height = node.getAttribute("height");
    node.setAttribute("width",width-10);
    node.setAttribute("height",height-10);
    }
    </script>
    </HEAD><BODY>
    <button onclick="enlarge('image');return true;">放大</button><button onclick="shrink('image');return true;">缩小</button><br/><br/>
    <img id="image" src="./image/image1.gif">
    </BODY>
    </HTML>