0
How could I stop the recharge if there was something inside a div
? and it would be possible to prevent by making another div
appear with the notice confirmation request instead of the alert
javascript? I have no idea how I could do this.
0
How could I stop the recharge if there was something inside a div
? and it would be possible to prevent by making another div
appear with the notice confirmation request instead of the alert
javascript? I have no idea how I could do this.
2
Guys how much recharging I find it hard to block this, the most you can block would be the F5 key but when checking the content of the DIV I can help you.
You can use jQuery with the following code.
if ($('div').html() !== ""){
alert('Esta div possui conteudo');
}
else{
alert('sta div possui conteudo');
}
Browser other questions tagged javascript
You are not signed in. Login or sign up in order to post.
Can’t stop a page from reloading. What you can do is use
localStorage
to save certain content and then capture it when the page is loaded.– Valdeir Psr
Stop loading cannot because JS will only know the element exists when it is loaded.
– Sam
would not even be able to perform a last function before the next page is loaded?
– João Victor
Use the event
onbeforeunload
.– Valdeir Psr
It worked, vlw.
– João Victor
Now that I understand rs... I understood "load" instead of "Reload"
– Sam