CSS+js 實現mouse移動儲存格上全部顯示

來源:互聯網
上載者:User

<STYLE>
<!--
 
.divover {
 BORDER-RIGHT: #999999 1px outset; PADDING-RIGHT: 4px; BORDER-TOP: #999999 1px outset; PADDING-LEFT: 4px; Z-INDEX: 2; BORDER-LEFT: #999999 1px outset; WIDTH: 100%; COLOR: #37609d; BORDER-BOTTOM: #999999 1px outset; POSITION: absolute; BACKGROUND-COLOR: #ffffcc
}
.divout {
 PADDING-RIGHT: 5px; PADDING-LEFT: 5px; Z-INDEX: 1; OVERFLOW: hidden; WIDTH: 100%; POSITION: absolute; HEIGHT: 14px
}

-->
</STYLE>
<SCRIPT language=javascript><!-- 

 function DivOnMouseOver(obj) {
  if(obj.innerText != "" && obj.innerText != "-")
  {
  var cs = obj.currentStyle.cursor;
  obj.className = "DivOver";
  obj.style.cursor = cs;
  }
 }

 function DivOnMouseOut(obj) {
  obj.className = "DivOut";
 }
--></SCRIPT>

<TABLE class=datagrid border=1 cellSpacing=0 cellPadding=1 width="100%">

<TBODY>
<TR>
<TH width=70>操作</TH>
<TH width="12%">單據編號</TH>
<TH width="11%" noWrap>日期</TH>
<TH width="8%">制單人</TH>
<TH width="10%">退貨日期</TH>
<TH width="6%">審批</TH>
<TH width="6%">終止</TH>
<TH width="6%">數量</TH>
<TH width="10%">金額</TH>
<TH width="15%">備忘</TH>
</TR>

<TR onmouseover="this.style.backgroundColor = '#F9F9F0';" onmouseout="this.style.backgroundColor = '';" vAlign=top>

<TD align=center> </TD>

<TD >
<DIV style="CURSOR: auto" class=DivOut onmouseover=DivOnMouseOver(this); onmouseout=DivOnMouseOut(this);> 577001_PA40908220132ddddddddd </DIV></TD>
<TD class=blackBorder>
<DIV style="CURSOR: auto" class=DivOut onmouseover=DivOnMouseOver(this); onmouseout=DivOnMouseOut(this);>2019-08-22</DIV></TD>
<TD class=blackBorder>
<DIV style="CURSOR: auto" class=DivOut onmouseover=DivOnMouseOver(this); onmouseout=DivOnMouseOut(this);>系統管理員</DIV></TD>
<TD class=blackBorder>
<DIV class=DivOut onmouseover=DivOnMouseOver(this); onmouseout=DivOnMouseOut(this);>2009-09-01</DIV></TD>
<TD class=blackBorder>&nbsp;&nbsp;</TD>
<TD class=blackBorder>&nbsp;&nbsp;</TD>
<TD class=blackBorder>
<DIV style="CURSOR: auto" class=DivOut onmouseover=DivOnMouseOver(this); onmouseout=DivOnMouseOut(this);>8</DIV></TD>
<TD class=blackBorder>
<DIV style="CURSOR: auto" class=DivOut onmouseover=DivOnMouseOver(this); onmouseout=DivOnMouseOut(this);>620.00</DIV></TD>
<TD class=blackBorder>
<DIV class=DivOut onmouseover=DivOnMouseOver(this); onmouseout=DivOnMouseOut(this);></DIV></TD></TR>
<TR style="DISPLAY: none" id=hdTrList577001_PA40908220132 alt="0">
<TD><INPUT value=hdTrList577001_PA40908220132 type=hidden></TD>
<TD id=hdTdList577001_PA40908220132 colSpan=100></TD>

</TR> 

</TBODY>

</TABLE>

相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.