开发者

How do I ignore the action of appearence of actionSheet when holding down a link for a seconds in UIWebView

I have noticed that the app "Reeder" is using the UIWebView but ignores this event. it displays a cus开发者_JS百科tom view instead of the original UIActionSheet view.


found a solution myself:

avoid using any html tag <a></a>, instead use javascript onClick to handle click event.

here is an example :


<script type="text/javascript">
window.plaction = function(url) {
    window.location.href = url;
    // window.location = url;
};
</script>

<p> onclick="plaction('title:a::url:http://localhost:3000/toplists/2.xml')" class="name">contents<p>

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜