首页 > 解决方案 > 使用“ontouchstart”事件调用/调用模式

问题描述

在按钮中,使用按钮的数据目标调用模态,但由于我有一个触摸屏,我想使用 ontouchstart (当触摸按钮时,未单击)来调用模态。

有什么建议我该如何实施?

这就是我目前调用模态的方式:(模态 id 是 myModal)

请建议我如何使用触摸功能调用 div。

标签: htmlmodal-dialogontouchstart

解决方案


最后我使用调用模态的函数调用模态。step1:调用函数:ontouchstart=myfunction() step2:调用函数中的modal myfunction(){$scope.openModa = function(){$('#myModalname').modal('show');};}


推荐阅读