当鼠标放在表格的竖线上,用js改变鼠标的形状,当按下鼠标时做一些操作

解决方案 »

  1.   


    竖线上!!! 要是border="0"呢
      

  2.   


    $("tr").mouseover(
      function(){
       $(this).css("cursor","pointer");}
    ).mouseout(
       function(){
       $(this).css("cursor","default");}
    ).click(
      function()
       {//点击时做你想做的事}
    );  
      

  3.   


    <table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="1" style="cursor:nw-resize"></td>
        <td width="98%" style="height:3px;border-bottom:1px #000000 solid; cursor:s-resize;">&nbsp;</td>
        <td width="1" style="cursor:ne-resize"></td>
      </tr>
      <tr>
        <td style="border-right:1px #000000 solid;cursor:e-resize;">&nbsp;</td>
        <td height="100">&nbsp;</td>
        <td style="border-left:1px #000000 solid;cursor:e-resize;">&nbsp;</td>
      </tr>
      <tr>
        <td style="cursor:ne-resize">&nbsp;</td>
        <td style="border-top:1px #000000 solid;cursor:s-resize;">&nbsp;</td>
        <td style="cursor:se-resize">&nbsp;</td>
      </tr>
    </table>
      

  4.   

    看来是没有直接的方法了,本意是不改变原来表格的数据结构,不添加数据内容,只是通过css来实现其功能,看来是不容易呀
      

  5.   

    应该不行的,你放个div在你的竖线上,移到div时改变鼠标状态并触发事件
    http://topic.csdn.net/u/20110712/15/30f6992b-dd37-45d4-ba43-28de7b8340d9.html
    这里有写个类似的,不过是改变div的高度高度。
      

  6.   

    利用辅助的div已经实现了,关键是不想破坏原来的数据表,只想通过css控制,看来是不容易办到
      

  7.   

    你可以判断mouseover,再获取鼠标位置来判断,只不过这样比较麻烦一点
      

  8.   

    加个属性 contentEditable=true