I'm doing a project with jQuery (Ajax y Json especificamente)
, where the data I add to my document with JavaScript
for which the pages do not have url, and if I do F5
all the data are erased, I try to capture the F5
and load them again the data, but only works when there is a Alert
in between
var vta = 0;
function capturarf5(e) {
//alert("f5");
var code = (e.keyCode ? e.keyCode : e.which);
if (code === 116) {
if (vta === 1)
$("#contenedor").load("Lista");
}
}
document.onkeydown = capturarf5;
Any way to reload the data?