找回密码
 立即注册

QQ登录

只需一步,快速开始

ZenosZeng 讲师达人认证 悬赏达人认证
超级版主   /  发表于:2012-6-30 20:45  /   查看:5326  /  回复:0
Spread提供了GrayAreaCursorType属性用于设置空白区域鼠标形状,不过有时候我们希望能够设置Spread整个区域的鼠标形状,这时候我们需要在客户端通过JS来完成这一功能。

主要JS代码如下:
  1.     <script type="text/javascript">
  2.         function SetSpreadCursor() {
  3.             var cell = event.srcElement;
  4.             while ((cell != null) &amp;&amp; (cell.id.indexOf("<%=FpSpread1.ClientID %>") == -1)) {
  5.                 cell = cell.parentElement;
  6.             }
  7.             if ((cell != null) &amp;&amp; (cell.id.indexOf("<%=FpSpread1.ClientID %>") != -1)) {
  8.                 event.srcElement.style.cursor = "help";
  9.             }
  10.         }   
  11.     </script>
复制代码



cursor.png


源码下载:VS2010 + Spread for ASP.NET 6.0.3505
5041_Cursor.zip (7.09 KB, 下载次数: 444)

0 个回复

您需要登录后才可以回帖 登录 | 立即注册
返回顶部