如何实现鼠标移到图片的左半部分显示“上一张”,右半部分显示“下一张”,点击进入下一张或上一张图片 
类似新浪的图片显示

解决方案 »

  1.   


    <img src="Images/cunbg/2.gif" border="0" usemap="#1" style="CURSOR: hand; "><map name="1">
      <area shape="poly" coords="72,64,126,28,65,3,4,30" href="nongchang.asp?action=xuan&id=1" alt="上一张" onFocus="this.blur()">
    </map>
      

  2.   

    用map你自己找找去吧,上边我也前写的。。
      

  3.   

    <img src="Images/cunbg/2.gif" border="0" usemap="#1" style="CURSOR: hand; width:100px;height:100px;"><map name="1">
      <area shape="rect" coords="0,0,50,100" href="nongchang.asp?action=xuan&id=1" alt="left" onFocus="this.blur()">
      <area shape="rect" coords="50,0,100,100" href="nongchang.asp?action=xuan&id=2" alt="right" onFocus="this.blur()">
    </map>
      

  4.   

    <img src="Images/cunbg/2.gif" border="0" usemap="#1" style="CURSOR: hand; width:100px;height:100px;"><map name="1">
      <area shape="rect" coords="0,0,50%,100%" href="nongchang.asp?action=xuan&id=1" alt="left" onclick="this.blur()">
      <area shape="rect" coords="50%,0,100%,100%" href="nongchang.asp?action=xuan&id=2" alt="right" onclick="this.blur()">
    </map>
      

  5.   

    用js吧,还要改变鼠标的样式 呢
    判断iE用
    offsetX
    其它用layerX
    position要是relative或者absolute才能取到layerX