怎样实现双击一个图片,然后跳转到另一个页面去,并且还要把图片的id传递到跳转的那个页面去

解决方案 »

  1.   

    把图片放在链接标签中,通过链接地址栏传递
    <a href="test.aspx?id=1"><img src=""/></a>
      

  2.   


    <img src="../../../images/Main/Close.jpg" style="cursor: pointer" onclick="Goto('xxx')" />Goto是javascript脚本,跳转
      

  3.   

    js:
    <script>
    function Tiao(imgid)
    {
    window.location="http://www.xxxx.com?id="+imgid;
    }
    </script>
    html:
    <img src="button_login.gif" width="53" height="20" id="img1" ondblclick="Tiao(this.id)" />
      

  4.   

    <img id="img1" src="" ondblclick="location.href='***.aspx?id='+this.id" />
      

  5.   

    来复杂一点的:
    http://www.cnblogs.com/insus/archive/2012/11/09/2762894.html