html - 使用“ontouchstart”事件调用/调用模式
问题描述
在按钮中,使用按钮的数据目标调用模态,但由于我有一个触摸屏,我想使用 ontouchstart (当触摸按钮时,未单击)来调用模态。
有什么建议我该如何实施?
这就是我目前调用模态的方式:(模态 id 是 myModal)
请建议我如何使用触摸功能调用 div。
解决方案
最后我使用调用模态的函数调用模态。step1:调用函数:ontouchstart=myfunction() step2:调用函数中的modal myfunction(){$scope.openModa = function(){$('#myModalname').modal('show');};}
推荐阅读
- java - 如何使用 Java 11 和 gradle 从 XSD 生成 java 类?
- json - 如何在 AWS IoT 上访问 MQTT 消息中的嵌套 JSON 元素?
- javascript - Javascript回调函数无法访问父函数变量
- amazon-web-services - 重试尝试之间的 Aws StepFunction 通知
- graphql - 运行突变以存储新用户的帖子返回错误:变量“$data”类型的预期值
- sql-server - Azure Data Studio 不会连接到 Debian 10 上的 MSSQL 服务器
- view - 有没有人有一个很好的解决方案来记录使用 Views REST 导出显示生成的 API?
- r - 重新排序箱线图中的列 ggplot2
- reactjs - React Forms 数据存在于两个组件中
- javascript - JQuery中具有相同父类的多个id选择器