Javascript 更改Webview中的链接行为

Javascript 更改Webview中的链接行为,javascript,webview,titanium-mobile,Javascript,Webview,Titanium Mobile,我在钛合金手机公司工作。我的问题是: Can I change the behavior of the link present in the webview??? i、 假设我有一条短信:我的名字叫伯翰。在本文中,Burhan是一个链接。所以我需要当我点击Burhan时,它应该会打开一个窗口,我在其中放置我的标签等。有可能吗 PS:我想要的解决方案只是点击链接,而不是点击网络视图。。 PS:我如何跟踪webview中的链接被点击???(我只需要这个) 有什么帮助吗??? 提前谢谢 最简单的

我在钛合金手机公司工作。我的问题是:

 Can I change the behavior of the link present in the webview???
i、 假设我有一条短信:我的名字叫伯翰。在本文中,Burhan是一个链接。所以我需要当我点击Burhan时,它应该会打开一个窗口,我在其中放置我的标签等。有可能吗

PS:我想要的解决方案只是点击链接,而不是点击网络视图。。 PS:我如何跟踪webview中的链接被点击???(我只需要这个)

有什么帮助吗???
提前谢谢

最简单的解决方案是使用
Ti.App
EventListeners

在WebView中,您需要提供如下标记

<span onclick="Ti.App.fireEvent('url', {information: 'thatcanbeuseful', like: 'anUrl'});">Your Name</span>

可悲的是,还没有人帮忙
Ti.App.addEventListener('url', function(e){
    // open a window or someting or open an URL with:
    Ti.Platform.openURL(e.anUrl); // from passed object
});