Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我的 Cordova 应用程序显示实际邮寄地址列表。如果您不小心点击了某个地址(在滚动时),Android 会启动 Google 地图。我怎么能防止呢?
PS:地址没有链接到任何东西,我有
<meta name="format-detection" content="address=no">
这没有效果。
提前感谢您的宝贵时间!
由于我没有得到答案,因此我发布了一个对我有用的解决方案,希望它可以帮助处于类似情况的人。
我将每个地址包含在 a 中<span>并添加了onclick处理程序以覆盖默认行为:
<span>
onclick
<span onclick="javascript:void(0)">1700 BROADWAY</span>
这只是一种解决方法,忽视<meta name="format-detection" content="address=no">是令人遗憾的。