找回密码
 立即注册

QQ登录

只需一步,快速开始

ryukinkou

中级会员

2

主题

6

帖子

562

积分

中级会员

积分
562

活字格认证

最新发帖
ryukinkou
中级会员   /  发表于:2012-7-24 10:14  /   查看:6801  /  回复:5
比如spread下面有个按钮,然后按tab键光标移动到了spread的最后一个单元格之后,再按一下,焦点就跳到按钮上面。

5 个回复

倒序浏览
iceman
社区贡献组   /  发表于:2012-7-24 11:53:00
沙发
回复 1楼ryukinkou的帖子

请使用以下代码测试:

  1.     <script type="text/javascript">
  2.         function keydownfun() {
  3.             if (event.keyCode == 9) {

  4.                 var hidden = this.document.getElementById("<%=HiddenField1.ClientID%>");
  5.                 var spread = this.document.getElementById("<%=FpSpread1.ClientID %>");
  6.                 var button = this.document.getElementById("<%=Button1.ClientID %>");

  7.                 if (hidden.value == 'spread') {
  8.                     spread.SetActiveCell(2, 3);
  9.                     spread.focus();
  10.                     hidden.value = 'button';
  11.                 }
  12.                 else {
  13.                     spread.SetActiveCell(2, 3);
  14.                     button.focus();
  15.                     hidden.value = 'spread';
  16.                 }
  17.             }
  18.         }
  19.     </script>
复制代码
回复 使用道具 举报
ryukinkou
中级会员   /  发表于:2012-7-24 13:14:00
板凳
试了下,这个不行,可以获得外面的button,也用了他的focus方法,但是就是无法转移focus到外面。
回复 使用道具 举报
iceman
社区贡献组   /  发表于:2012-7-24 17:42:00
地板
回复 3楼ryukinkou的帖子

ryukinkou 你好,问题正在处理中,明天回复。
回复 使用道具 举报
iceman
社区贡献组   /  发表于:2012-7-25 11:53:00
5#
回复 4楼iceman的帖子

请参考测试Demo:
5342.zip (2.05 KB, 下载次数: 510)
回复 使用道具 举报
wp_pandy
高级会员   /  发表于:2012-8-9 14:28:00
6#
楼主你使用tab能在FpSpread中跳转吗?我的不行啊,我的直接就跳到外面了,不能在里面跳
回复 使用道具 举报
您需要登录后才可以回帖 登录 | 立即注册
返回顶部