Javascript location=在onload之前是否可以始终在历史记录中创建新项目?
我正在使用Intent URI从网页打开Android应用程序 用户正在查看Javascript location=在onload之前是否可以始终在历史记录中创建新项目?,javascript,events,redirect,html5-history,Javascript,Events,Redirect,Html5 History,我正在使用Intent URI从网页打开Android应用程序 用户正在查看示例.net/unpaid 用户单击要支付的项目旁边的费用 浏览器导航到示例.net/charge?ref=… 哪些产出: <script>location='intent:... my android payment app ...'</script> <a href="javascript:history.back()">click here to return</a>
示例.net/unpaid
用户单击要支付的项目旁边的费用
浏览器导航到示例.net/charge?ref=…
哪些产出:
<script>location='intent:... my android payment app ...'</script>
<a href="javascript:history.back()">click here to return</a>
但这让我想到。。有没有一种方法可以在“返回”历史记录中获取新条目,而不必等待load
事件被触发
<script>
onload=function() {
setTimeout(function () {
location = ...
}, 1}
}
</script>