日常怕坑之路,哈哈,產品反饋的問題,小趙啊在蘋果的部分機型上點擊事件不起作用了,有時候真心覺得程序員經驗就是靠bug給堆起來的。
安卓機子,模擬測試正常,蘋果上確實有問題哈哈
經查閱資料 看到有一種解決方法
在需要點擊的對象上面 添加 css樣式 cursor:pointer;
至於爲什麼,本猜測可能看起來是人用手進行點擊的哈哈
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<script src="https://cdn.bootcss.com/jquery/1.11.3/jquery.min.js"></script>
<style>
.demo{cursor:pointer;}
</style>
</head>
<body>
<div class="demo">
</div>
<script>
$(document.body).on('click','demo',function(){
alert('hello world')
})
</script>
</body>
</html>