按钮单击仅在Windows& Windows上有效在Android移动工作表上不起作用 [英] button click is only working on Windows & not working on Android mobile sheet

查看:79
本文介绍了按钮单击仅在Windows& Windows上有效在Android移动工作表上不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在Google电子表格中创建了一个图像按钮,并分配了功能,以执行一些操作. 但是此按钮单击仅适用于Windows,不适用于Android移动工作表或移动浏览器.解决此问题的方法是什么?

I have created an image button in Google spreadsheet and have assigned function, to perform some action. But this button click is only working on windows and not working on Android mobile sheet or mobile browser. what is a workaround for this issue?

推荐答案

解决方法是使用复选框(例如,在F1中)而不是按钮/图像.然后钩上您的函数,该函数应该在单击onEdit()函数的按钮上运行.

Workaround is to use checkboxes(say, in F1) instead of buttons/Images. Then hook your function, that is supposed to run on button click to onEdit() function.

function onEdit(e){
  const rg = e.range;
  if(rg.getA1Notation() === "F1" && rg.isChecked() && rg.getSheet().getName() === "Sheet1"){
    callFunctionAttachedToImage();
    rg.uncheck();
  }
}

参考文献:

  • 类范围
  • 事件对象
  • References:

    • Class Range
    • Event Objects
    • 这篇关于按钮单击仅在Windows& Windows上有效在Android移动工作表上不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆