Javascript 再次启动浏览器并导航到该页面,获取最新结果,而不触发onchange:) window.onload = function(){ element.onchange = function(){ element.onchange = functio
再次启动浏览器并导航到该页面,获取最新结果,而不触发onchange:)Javascript 再次启动浏览器并导航到该页面,获取最新结果,而不触发onchange:) window.onload = function(){ element.onchange = function(){ element.onchange = functio,javascript,html,firefox,Javascript,Html,Firefox,再次启动浏览器并导航到该页面,获取最新结果,而不触发onchange:) window.onload = function(){ element.onchange = function(){ element.onchange = function(e){ if(e.cancelable == true){ document.onchange = function(e){ if(e.cancelable == true){
window.onload = function(){
element.onchange = function(){
element.onchange = function(e){
if(e.cancelable == true){
document.onchange = function(e){
if(e.cancelable == true){
window.location = window.location
}
}
document.onchange = function (e) {
//this will be triggered on restore before the window load event
alert('restore onchange called, e.cancelable = ' + e.cancelable)
}
window.onload = function (e) {
//You'll see that on restore, this will be triggered but after page has been updated
alert('window load called')
document.onchange = function () {
//This onchange will be called normally, not on restore
alert('after onload change, e.cancelable = ' + e.cancelable)
}
}
<script language="JavaScript" type="text/javascript" src="yourscript.js?n=1"></script>