开发者

How can I detect an onclick event of the whole body element in uiwebview of iOS?

开发者 https://www.devze.com 2023-03-23 13:00 出处:网络
The html page goes like this:<body onclick=\"doSomething();\">...</body> It works fine in chrome or firefox, yet no response in UIWebVi开发者_StackOverflowew of iOS.Is it banned by Apple

The html page goes like this: <body onclick="doSomething();">...</body>

It works fine in chrome or firefox, yet no response in UIWebVi开发者_StackOverflowew of iOS.Is it banned by Apple or something? Or if there any way to work around it?


Try this:

<body ontouchend="doSomething();">

Reference:
[1] Event handling documentation.
[2] Does UIGestureRecognizer work on a UIWebView?

0

精彩评论

暂无评论...
验证码 换一张
取 消