如何将页面重定向到任何非http url?
我的url是:itms-services://?action=download-manifest&url=itms-services://?action=download-manifest&url=http://mydomain.com/download/iOS/myapp.plist
我尝试了以下代码:
window.location.assign("itms-services://?action=download-manifest&url=itms-services://?action=download-manifest&url=http://mydomain.com/download/iOS/myapp.plist");它可以在firefox中工作,但不能在chrome中工作。
发布于 2014-06-26 01:32:16
window.location.href在IOS Safari和Gmail IOS浏览器中运行良好。以下是我的工作代码:
<!-- Users click on this install link -->
<a href="#" onclick="trackOutboundLink('{{ download_url }}'); return false;">Install App</a>
<script>
var trackOutboundLink = function (url) {
// do whatever process you need here, and redirect at the end
window.location.href = url;
};
</script>https://stackoverflow.com/questions/20238523
复制相似问题